diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-27 14:16:12 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-31 08:29:44 +0200 |
commit | 23fec9f0e18dc4913fab818118f836af150b98f3 (patch) | |
tree | 66228f23bbf654117a33e28db7a017eea21fb785 /cpukit/rtems/src/timercreate.c | |
parent | score: Use thread life protection for API mutexes (diff) | |
download | rtems-23fec9f0e18dc4913fab818118f836af150b98f3.tar.bz2 |
score: PR2152: Use allocator mutex for objects
Use allocator mutex for objects allocate/free. This prevents that the
thread dispatch latency depends on the workspace/heap fragmentation.
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/src/timercreate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cpukit/rtems/src/timercreate.c b/cpukit/rtems/src/timercreate.c index 35cdfab7fa..0b1c44bdc2 100644 --- a/cpukit/rtems/src/timercreate.c +++ b/cpukit/rtems/src/timercreate.c @@ -38,12 +38,10 @@ rtems_status_code rtems_timer_create( if ( !id ) return RTEMS_INVALID_ADDRESS; - _Thread_Disable_dispatch(); /* to prevent deletion */ - the_timer = _Timer_Allocate(); if ( !the_timer ) { - _Thread_Enable_dispatch(); + _Objects_Allocator_unlock(); return RTEMS_TOO_MANY; } @@ -57,6 +55,6 @@ rtems_status_code rtems_timer_create( ); *id = the_timer->Object.id; - _Thread_Enable_dispatch(); + _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } |