From 6eb79f812ee43a4e9142de61a5821e0cc8c52bb1 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 26 Apr 2015 15:47:47 +0200 Subject: 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. --- kern/thread_swap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kern/thread_swap.h') diff --git a/kern/thread_swap.h b/kern/thread_swap.h index 9d645373..d032accf 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_ */ -- cgit v1.2.3