diff options
author | Richard Braun <rbraun@sceen.net> | 2017-08-25 21:47:46 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-08-25 21:47:46 +0200 |
commit | 8119ef95c94aafdec81e4646b9425922107e73b7 (patch) | |
tree | d9dc4517afd7637c8fb77ee6ad6ca398c1d0ce99 /kern/thread.c | |
parent | 1fcd8e7e40c3c10b4b694be3786b8a9cb7a38391 (diff) |
kern/thread: add a stack debugging assertion on scheduling
Diffstat (limited to 'kern/thread.c')
-rw-r--r-- | kern/thread.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kern/thread.c b/kern/thread.c index 17586eaf..fba95e06 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -609,6 +609,8 @@ thread_runq_schedule(struct thread_runq *runq) prev = thread_self(); + assert((__builtin_frame_address(0) >= prev->stack) + && (__builtin_frame_address(0) < (prev->stack + TCB_STACK_SIZE))); assert(prev->preempt == THREAD_SUSPEND_PREEMPT_LEVEL); assert(!cpu_intr_enabled()); spinlock_assert_locked(&runq->lock); |