getRemainingStack() is back!
This commit is contained in:
parent
18370463b0
commit
b7b5c28be7
|
@ -42,12 +42,10 @@ int getRemainingStack(thread_t *otp) {
|
|||
|
||||
int remainingStack;
|
||||
if (ch.dbg.isr_cnt > 0) {
|
||||
remainingStack = 9999;
|
||||
// ISR context
|
||||
// todo remainingStack = (int)(r13 - 1) - (int)&__main_stack_base__;
|
||||
remainingStack = (int)(r13 - 1) - (int)&__main_stack_base__;
|
||||
} else {
|
||||
remainingStack = 9999;
|
||||
// todo remainingStack = (int)(r13 - 1) - (int)otp->p_stklimit;
|
||||
remainingStack = (int)(r13 - 1) - (int)otp->wabase;
|
||||
}
|
||||
otp->remainingStack = remainingStack;
|
||||
return remainingStack;
|
||||
|
|
|
@ -39,12 +39,10 @@ int getRemainingStack(thread_t *otp) {
|
|||
|
||||
int remainingStack;
|
||||
if (ch.dbg.isr_cnt > 0) {
|
||||
remainingStack = 9999;
|
||||
// ISR context
|
||||
// todo remainingStack = (int)(r13 - 1) - (int)&__main_stack_base__;
|
||||
remainingStack = (int)(r13 - 1) - (int)&__main_stack_base__;
|
||||
} else {
|
||||
remainingStack = 9999;
|
||||
// todo remainingStack = (int)(r13 - 1) - (int)otp->p_stklimit;
|
||||
remainingStack = (int)(r13 - 1) - (int)otp->wabase;
|
||||
}
|
||||
otp->remainingStack = remainingStack;
|
||||
return remainingStack;
|
||||
|
|
Loading…
Reference in New Issue