diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-16 16:39:43 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-23 12:52:06 +0100 |
commit | 125f248231c173a038ed9fc00832e0b3d221ad43 (patch) | |
tree | 3894553badc7582b0c460aec4d34955f23ea3e81 /cpukit/score/include/rtems/score/threadimpl.h | |
parent | score: Robust thread dispatch (diff) | |
download | rtems-125f248231c173a038ed9fc00832e0b3d221ad43.tar.bz2 |
score: Add thread queue enqueue callout
Replace the expected thread dispatch disable level with a thread queue
enqueue callout. This enables the use of _Thread_Dispatch_direct() in
the thread queue enqueue procedure. This avoids impossible exection
paths, e.g. Per_CPU_Control::dispatch_necessary is always true.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 61694461b4..a38b23c2b6 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -245,6 +245,11 @@ void _Thread_Cancel( void *exit_value ); +typedef struct { + Thread_queue_Context Base; + Thread_Control *cancel; +} Thread_Close_context; + /** * @brief Closes the thread. * @@ -252,7 +257,11 @@ void _Thread_Cancel( * case the executing thread is not terminated, then this function waits until * the terminating thread reached the zombie state. */ -void _Thread_Close( Thread_Control *the_thread, Thread_Control *executing ); +void _Thread_Close( + Thread_Control *the_thread, + Thread_Control *executing, + Thread_Close_context *context +); RTEMS_INLINE_ROUTINE bool _Thread_Is_ready( const Thread_Control *the_thread ) { |