From 391ad3ee4ff868c637a4e1c254da96f194be04e4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 17 Mar 2014 15:03:22 +0100 Subject: score: Fix thread restart extensions context Run the thread restart extensions in the context of the restarted thread. Run them with thread dispatching enabled. --- cpukit/posix/src/pthread.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index d2e637365e..0416e28adf 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -255,6 +255,15 @@ static bool _POSIX_Threads_Create_extension( return true; } +static void _POSIX_Threads_Restart_extension( + Thread_Control *executing, + Thread_Control *restarted +) +{ + (void) executing; + _POSIX_Threads_cancel_run( restarted ); +} + /* * _POSIX_Threads_Delete_extension * @@ -336,7 +345,7 @@ User_extensions_Control _POSIX_Threads_User_extensions = { { { NULL, NULL }, NULL }, { _POSIX_Threads_Create_extension, /* create */ NULL, /* start */ - NULL, /* restart */ + _POSIX_Threads_Restart_extension, /* restart */ _POSIX_Threads_Delete_extension, /* delete */ NULL, /* switch */ NULL, /* begin */ -- cgit v1.2.3