From 2c1cccc529737527ad9ef981952d2c14d3dd13ec Mon Sep 17 00:00:00 2001 From: Flávio Cruz Date: Fri, 28 Aug 2015 01:34:01 +0200 Subject: Make sure the reply port's reference is released when the thread needs to be halted. * kern/thread.h (thread_halt_self): Add continuation_t parameter. * kern/thread.c (thread_halt_self): Pass continuation_t parameter to thread_block instead of thread_exception_return. * kern/ast.c (ast_taken): Pass thread_exception_return to thread_halt_self. * kern/profile.c (profile_thread): Likewise. * kern/exception.c (exception_no_server): Likewise. (thread_release_and_exception_return): New function. (exception_raise_continue_slow): Pass thread_release_and_exception_return to thread_halt_self. --- kern/ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kern/ast.c') diff --git a/kern/ast.c b/kern/ast.c index 4b9d63d6..2772ed3e 100644 --- a/kern/ast.c +++ b/kern/ast.c @@ -96,7 +96,7 @@ ast_taken(void) if (self != current_processor()->idle_thread) { #ifndef MIGRATING_THREADS while (thread_should_halt(self)) - thread_halt_self(); + thread_halt_self(thread_exception_return); #endif /* -- cgit v1.2.3