summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/regioncreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/regioncreate.c')
-rw-r--r--cpukit/rtems/src/regioncreate.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/cpukit/rtems/src/regioncreate.c b/cpukit/rtems/src/regioncreate.c
index 0daf644ce3..409510c892 100644
--- a/cpukit/rtems/src/regioncreate.c
+++ b/cpukit/rtems/src/regioncreate.c
@@ -71,6 +71,11 @@ rtems_status_code rtems_region_create(
return_status = RTEMS_TOO_MANY;
else {
+ _Thread_queue_Initialize(
+ &the_region->Wait_queue,
+ _Attributes_Is_priority( attribute_set ) ?
+ THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO
+ );
the_region->maximum_segment_size = _Heap_Initialize(
&the_region->Memory, starting_address, length, page_size
@@ -79,23 +84,13 @@ rtems_status_code rtems_region_create(
if ( !the_region->maximum_segment_size ) {
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
- }
-
- else {
-
+ } else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
- _Thread_queue_Initialize(
- &the_region->Wait_queue,
- _Attributes_Is_priority( attribute_set ) ?
- THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
- RTEMS_TIMEOUT
- );
-
_Objects_Open(
&_Region_Information,
&the_region->Object,