summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/timercreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/timercreate.c')
-rw-r--r--cpukit/rtems/src/timercreate.c6
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;
}