summaryrefslogtreecommitdiff
path: root/kern/thread_swap.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-04-26 15:47:47 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-05-20 10:56:15 +0200
commit6eb79f812ee43a4e9142de61a5821e0cc8c52bb1 (patch)
tree40bf469bc4c852bd605949d29033b46ae2fb1775 /kern/thread_swap.h
parent3c3d3614673c93bf1b1f47d612d8067455d06920 (diff)
kern: gracefully handle resource shortage
* kern/thread.c (stack_alloc): Report resource shortage. * kern/sched_prim.h (stack_alloc): Adjust declaration accordingly. * kern/thread_swap.c (thread_doswapin): Report resource shortage. (swapin_thread_continue): If the swap-in fails, put the thread back on the queue and go back to sleep. * kern/thread_swap.h (thread_doswapin): Adjust declaration accordingly.
Diffstat (limited to 'kern/thread_swap.h')
-rw-r--r--kern/thread_swap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/thread_swap.h b/kern/thread_swap.h
index 9d64537..d032acc 100644
--- a/kern/thread_swap.h
+++ b/kern/thread_swap.h
@@ -37,7 +37,7 @@
*/
extern void swapper_init(void);
extern void thread_swapin(thread_t thread);
-extern void thread_doswapin(thread_t thread);
+extern kern_return_t thread_doswapin(thread_t thread);
extern void swapin_thread(void) __attribute__((noreturn));
#endif /* _KERN_THREAD_SWAP_H_ */