rtems: Fix binary semaphore resource count

Binary semaphores (not simple binary semaphores) maintain the resource
count since 8797c76add.  Do this also for
initially locked binary semaphores.
This commit is contained in:
Sebastian Huber
2016-11-03 10:55:31 +01:00
parent 0154dea369
commit 6e31b56f95
2 changed files with 3 additions and 6 deletions
+1 -4
View File
@@ -148,10 +148,7 @@ rtems_status_code rtems_semaphore_create(
&the_semaphore->Core_control.Mutex.Recursive.Mutex,
executing
);
if ( variant == SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY ) {
++executing->resource_count;
}
++executing->resource_count;
}
status = STATUS_SUCCESSFUL;
+2 -2
View File
@@ -70,8 +70,8 @@ rtems_task Init(
test_init();
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete" );
status = rtems_task_suspend( RTEMS_SELF );
directive_failed( status, "rtems_task_suspend" );
}
void test_init(void)