summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadhandler.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-07-08 16:58:48 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-07-25 08:40:14 +0200
commit0fd6f25507fbea5f4892b71b58837cdda17856b4 (patch)
treeb6964ed252dab7525ccfa2a59771f0c23b466c78 /cpukit/score/src/threadhandler.c
parentscore: Disable RTEMS_NO_RETURN for RTEMS_DEBUG (diff)
downloadrtems-0fd6f25507fbea5f4892b71b58837cdda17856b4.tar.bz2
score: Relax thread begin extension environment
Update #2752.
Diffstat (limited to 'cpukit/score/src/threadhandler.c')
-rw-r--r--cpukit/score/src/threadhandler.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c
index 2fa6d07f35..9f004b939e 100644
--- a/cpukit/score/src/threadhandler.c
+++ b/cpukit/score/src/threadhandler.c
@@ -59,13 +59,6 @@ void _Thread_Handler( void )
_Thread_Restore_fp( executing );
/*
- * Take care that 'begin' extensions get to complete before
- * 'switch' extensions can run. This means must keep dispatch
- * disabled until all 'begin' extensions complete.
- */
- _User_extensions_Thread_begin( executing );
-
- /*
* Do not use the level of the thread control block, since it has a
* different format.
*/
@@ -86,6 +79,14 @@ void _Thread_Handler( void )
_Thread_Do_dispatch( cpu_self, level );
/*
+ * Invoke the thread begin extensions in the context of the thread entry
+ * function with thread dispatching enabled. This enables use of dynamic
+ * memory allocation, creation of POSIX keys and use of C++ thread local
+ * storage. Blocking synchronization primitives are allowed also.
+ */
+ _User_extensions_Thread_begin( executing );
+
+ /*
* RTEMS supports multiple APIs and each API can define a different
* thread/task prototype. The following code supports invoking the
* user thread entry point using the prototype expected.