score: Rename _CORE_barrier_Wait()

Rename _CORE_barrier_Wait() into _CORE_barrier_Seize().  Rename
_CORE_barrier_Release() into _CORE_barrier_Surrender().  This avoids
confusion with the ISR lock acquire and release.
This commit is contained in:
Sebastian Huber
2016-04-19 15:07:39 +02:00
parent 242a05a586
commit 3d0c400558
6 changed files with 16 additions and 16 deletions

View File

@@ -52,7 +52,7 @@ int pthread_barrier_wait(
case OBJECTS_LOCAL: case OBJECTS_LOCAL:
executing = _Thread_Executing; executing = _Thread_Executing;
_CORE_barrier_Wait( _CORE_barrier_Seize(
&the_barrier->Barrier, &the_barrier->Barrier,
executing, executing,
true, true,

View File

@@ -54,7 +54,7 @@ rtems_status_code rtems_barrier_release(
switch ( location ) { switch ( location ) {
case OBJECTS_LOCAL: case OBJECTS_LOCAL:
*released = _CORE_barrier_Release( &the_barrier->Barrier, NULL, 0 ); *released = _CORE_barrier_Surrender( &the_barrier->Barrier, NULL, 0 );
_Objects_Put( &the_barrier->Object ); _Objects_Put( &the_barrier->Object );
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;

View File

@@ -40,7 +40,7 @@ rtems_status_code rtems_barrier_wait(
case OBJECTS_LOCAL: case OBJECTS_LOCAL:
executing = _Thread_Executing; executing = _Thread_Executing;
_CORE_barrier_Wait( _CORE_barrier_Seize(
&the_barrier->Barrier, &the_barrier->Barrier,
executing, executing,
true, true,

View File

@@ -84,7 +84,7 @@ RTEMS_INLINE_ROUTINE void _CORE_barrier_Destroy(
_Thread_queue_Destroy( &the_barrier->Wait_queue ); _Thread_queue_Destroy( &the_barrier->Wait_queue );
} }
void _CORE_barrier_Do_wait( void _CORE_barrier_Do_seize(
CORE_barrier_Control *the_barrier, CORE_barrier_Control *the_barrier,
Thread_Control *executing, Thread_Control *executing,
bool wait, bool wait,
@@ -116,7 +116,7 @@ void _CORE_barrier_Do_wait(
* @note Status is returned via the thread control block. * @note Status is returned via the thread control block.
*/ */
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
#define _CORE_barrier_Wait( \ #define _CORE_barrier_Seize( \
the_barrier, \ the_barrier, \
executing, \ executing, \
wait, \ wait, \
@@ -124,7 +124,7 @@ void _CORE_barrier_Do_wait(
mp_callout, \ mp_callout, \
mp_id \ mp_id \
) \ ) \
_CORE_barrier_Do_wait( \ _CORE_barrier_Do_seize( \
the_barrier, \ the_barrier, \
executing, \ executing, \
wait, \ wait, \
@@ -133,7 +133,7 @@ void _CORE_barrier_Do_wait(
mp_id \ mp_id \
) )
#else #else
#define _CORE_barrier_Wait( \ #define _CORE_barrier_Seize( \
the_barrier, \ the_barrier, \
executing, \ executing, \
wait, \ wait, \
@@ -141,7 +141,7 @@ void _CORE_barrier_Do_wait(
mp_callout, \ mp_callout, \
mp_id \ mp_id \
) \ ) \
_CORE_barrier_Do_wait( \ _CORE_barrier_Do_seize( \
the_barrier, \ the_barrier, \
executing, \ executing, \
wait, \ wait, \
@@ -149,7 +149,7 @@ void _CORE_barrier_Do_wait(
) )
#endif #endif
uint32_t _CORE_barrier_Do_release( uint32_t _CORE_barrier_Do_surrender(
CORE_barrier_Control *the_barrier CORE_barrier_Control *the_barrier
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
, ,
@@ -172,23 +172,23 @@ uint32_t _CORE_barrier_Do_release(
* @retval the number of unblocked threads * @retval the number of unblocked threads
*/ */
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
#define _CORE_barrier_Release( \ #define _CORE_barrier_Surrender( \
the_barrier, \ the_barrier, \
mp_callout, \ mp_callout, \
mp_id \ mp_id \
) \ ) \
_CORE_barrier_Do_release( \ _CORE_barrier_Do_surrender( \
the_barrier, \ the_barrier, \
mp_callout, \ mp_callout, \
mp_id \ mp_id \
) )
#else #else
#define _CORE_barrier_Release( \ #define _CORE_barrier_Surrender( \
the_barrier, \ the_barrier, \
mp_callout, \ mp_callout, \
mp_id \ mp_id \
) \ ) \
_CORE_barrier_Do_release( \ _CORE_barrier_Do_surrender( \
the_barrier \ the_barrier \
) )
#endif #endif

View File

@@ -23,7 +23,7 @@
#include <rtems/score/objectimpl.h> #include <rtems/score/objectimpl.h>
#include <rtems/score/threadqimpl.h> #include <rtems/score/threadqimpl.h>
uint32_t _CORE_barrier_Do_release( uint32_t _CORE_barrier_Do_surrender(
CORE_barrier_Control *the_barrier CORE_barrier_Control *the_barrier
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
, ,

View File

@@ -23,7 +23,7 @@
#include <rtems/score/statesimpl.h> #include <rtems/score/statesimpl.h>
#include <rtems/score/threadqimpl.h> #include <rtems/score/threadqimpl.h>
void _CORE_barrier_Do_wait( void _CORE_barrier_Do_seize(
CORE_barrier_Control *the_barrier, CORE_barrier_Control *the_barrier,
Thread_Control *executing, Thread_Control *executing,
bool wait, bool wait,
@@ -45,7 +45,7 @@ void _CORE_barrier_Do_wait(
the_barrier->Attributes.maximum_count) { the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_Thread_queue_Release( &the_barrier->Wait_queue, &lock_context ); _Thread_queue_Release( &the_barrier->Wait_queue, &lock_context );
_CORE_barrier_Release( the_barrier, mp_callout, mp_id ); _CORE_barrier_Surrender( the_barrier, mp_callout, mp_id );
return; return;
} }
} }