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/sched_prim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kern/sched_prim.h') diff --git a/kern/sched_prim.h b/kern/sched_prim.h index fd989b6c..62698dc2 100644 --- a/kern/sched_prim.h +++ b/kern/sched_prim.h @@ -150,7 +150,7 @@ extern void stack_handoff( * or are defined directly by machine-dependent code. */ -extern void stack_alloc( +extern kern_return_t stack_alloc( thread_t thread, void (*resume)(thread_t)); extern boolean_t stack_alloc_try( -- cgit v1.2.3