mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 16:39:02 +08:00
rtems: Fix semaphore field name
This commit is contained in:
@@ -87,11 +87,11 @@ rtems_monitor_sema_canonical(
|
||||
break;
|
||||
#endif
|
||||
case SEMAPHORE_VARIANT_SIMPLE_BINARY:
|
||||
canonical_sema->cur_count = rtems_sema->Core_control.semaphore.count;
|
||||
canonical_sema->cur_count = rtems_sema->Core_control.Semaphore.count;
|
||||
canonical_sema->max_count = 1;
|
||||
break;
|
||||
case SEMAPHORE_VARIANT_COUNTING:
|
||||
canonical_sema->cur_count = rtems_sema->Core_control.semaphore.count;
|
||||
canonical_sema->cur_count = rtems_sema->Core_control.Semaphore.count;
|
||||
canonical_sema->max_count = UINT32_MAX;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ typedef struct {
|
||||
* This is the SuperCore Semaphore instance associated with this Classic
|
||||
* API Semaphore instance.
|
||||
*/
|
||||
CORE_semaphore_Control semaphore;
|
||||
CORE_semaphore_Control Semaphore;
|
||||
|
||||
#if defined(RTEMS_SMP)
|
||||
MRSP_Control MRSP;
|
||||
|
||||
@@ -147,14 +147,14 @@ rtems_status_code rtems_semaphore_create(
|
||||
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
|
||||
the_semaphore->variant = SEMAPHORE_VARIANT_COUNTING;
|
||||
_CORE_semaphore_Initialize(
|
||||
&the_semaphore->Core_control.semaphore,
|
||||
&the_semaphore->Core_control.Semaphore,
|
||||
count
|
||||
);
|
||||
status = STATUS_SUCCESSFUL;
|
||||
} else if ( _Attributes_Is_simple_binary_semaphore( attribute_set ) ) {
|
||||
the_semaphore->variant = SEMAPHORE_VARIANT_SIMPLE_BINARY;
|
||||
_CORE_semaphore_Initialize(
|
||||
&the_semaphore->Core_control.semaphore,
|
||||
&the_semaphore->Core_control.Semaphore,
|
||||
count != 0
|
||||
);
|
||||
status = STATUS_SUCCESSFUL;
|
||||
|
||||
@@ -34,7 +34,7 @@ THREAD_QUEUE_OBJECT_ASSERT(
|
||||
|
||||
THREAD_QUEUE_OBJECT_ASSERT(
|
||||
Semaphore_Control,
|
||||
Core_control.semaphore.Wait_queue
|
||||
Core_control.Semaphore.Wait_queue
|
||||
);
|
||||
|
||||
#if defined(RTEMS_SMP)
|
||||
@@ -118,7 +118,7 @@ rtems_status_code rtems_semaphore_obtain(
|
||||
|| the_semaphore->variant == SEMAPHORE_VARIANT_COUNTING
|
||||
);
|
||||
status = _CORE_semaphore_Seize(
|
||||
&the_semaphore->Core_control.semaphore,
|
||||
&the_semaphore->Core_control.Semaphore,
|
||||
_Semaphore_Get_operations( the_semaphore ),
|
||||
executing,
|
||||
wait,
|
||||
|
||||
@@ -73,7 +73,7 @@ rtems_status_code rtems_semaphore_release( rtems_id id )
|
||||
break;
|
||||
case SEMAPHORE_VARIANT_SIMPLE_BINARY:
|
||||
status = _CORE_semaphore_Surrender(
|
||||
&the_semaphore->Core_control.semaphore,
|
||||
&the_semaphore->Core_control.Semaphore,
|
||||
_Semaphore_Get_operations( the_semaphore ),
|
||||
1,
|
||||
&queue_context
|
||||
@@ -96,7 +96,7 @@ rtems_status_code rtems_semaphore_release( rtems_id id )
|
||||
default:
|
||||
_Assert( the_semaphore->variant == SEMAPHORE_VARIANT_COUNTING );
|
||||
status = _CORE_semaphore_Surrender(
|
||||
&the_semaphore->Core_control.semaphore,
|
||||
&the_semaphore->Core_control.Semaphore,
|
||||
_Semaphore_Get_operations( the_semaphore ),
|
||||
UINT32_MAX,
|
||||
&queue_context
|
||||
|
||||
@@ -64,7 +64,7 @@ static void release_semaphore(rtems_id timer, void *arg)
|
||||
_Thread_Wait_flags_get(ctx->main_task_control)
|
||||
== (THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_READY_AGAIN)
|
||||
);
|
||||
sem = &ctx->semaphore_control->Core_control.semaphore;
|
||||
sem = &ctx->semaphore_control->Core_control.Semaphore;
|
||||
rtems_test_assert(sem->count == 0);
|
||||
} else {
|
||||
sc = rtems_semaphore_release(ctx->semaphore_id);
|
||||
|
||||
Reference in New Issue
Block a user