mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 18:35:27 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user