summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/partcreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/partcreate.c')
-rw-r--r--cpukit/rtems/src/partcreate.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index 32758f8f65..e3544e71b2 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -53,7 +53,7 @@ rtems_status_code rtems_partition_create(
rtems_id *id
)
{
- Partition_Control *the_partition;
+ Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
@@ -77,12 +77,10 @@ rtems_status_code rtems_partition_create(
return RTEMS_MP_NOT_CONFIGURED;
#endif
- _Thread_Disable_dispatch(); /* prevents deletion */
-
the_partition = _Partition_Allocate();
if ( !the_partition ) {
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return RTEMS_TOO_MANY;
}
@@ -91,7 +89,7 @@ rtems_status_code rtems_partition_create(
!( _Objects_MP_Allocate_and_open( &_Partition_Information, name,
the_partition->Object.id, false ) ) ) {
_Partition_Free( the_partition );
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return RTEMS_TOO_MANY;
}
#endif
@@ -122,6 +120,6 @@ rtems_status_code rtems_partition_create(
);
#endif
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return RTEMS_SUCCESSFUL;
}