forked from Imagelibrary/rtems
score: Get rid of mp_id parameter
Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
This commit is contained in:
@@ -413,7 +413,6 @@ rtems_bsdnet_semaphore_release (void)
|
||||
status = _CORE_mutex_Surrender (
|
||||
&the_networkSemaphore->Core_control.mutex,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
if (status != CORE_MUTEX_STATUS_SUCCESSFUL)
|
||||
|
||||
@@ -57,7 +57,6 @@ int _POSIX_Condition_variables_Signal_support(
|
||||
POSIX_CONDITION_VARIABLES_TQ_OPERATIONS,
|
||||
the_thread,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -103,7 +103,6 @@ int _POSIX_Condition_variables_Wait_support(
|
||||
core_mutex_status = _CORE_mutex_Surrender(
|
||||
&the_mutex->Mutex,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
_Assert( core_mutex_status == CORE_MUTEX_STATUS_SUCCESSFUL );
|
||||
|
||||
@@ -29,7 +29,6 @@ void _POSIX_Message_queue_Delete(
|
||||
_CORE_message_queue_Close(
|
||||
&the_mq->Message_queue,
|
||||
NULL, /* no MP support */
|
||||
0,
|
||||
lock_context
|
||||
);
|
||||
_POSIX_Message_queue_Free( the_mq );
|
||||
|
||||
@@ -98,7 +98,6 @@ int _POSIX_Message_queue_Send_support(
|
||||
msg_ptr,
|
||||
msg_len,
|
||||
NULL,
|
||||
0,
|
||||
_POSIX_Message_queue_Priority_to_core( msg_prio ),
|
||||
do_wait,
|
||||
timeout,
|
||||
|
||||
@@ -74,7 +74,6 @@ int pthread_mutex_setprioceiling(
|
||||
_CORE_mutex_Surrender(
|
||||
&the_mutex->Mutex,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
return 0;
|
||||
|
||||
@@ -43,7 +43,6 @@ int pthread_mutex_unlock(
|
||||
status = _CORE_mutex_Surrender(
|
||||
&the_mutex->Mutex,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
return _POSIX_Mutex_Translate_core_mutex_return_code( status );
|
||||
|
||||
@@ -57,7 +57,6 @@ int pthread_barrier_wait(
|
||||
true,
|
||||
0,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
return _POSIX_Barrier_Translate_core_barrier_return_code(
|
||||
|
||||
@@ -30,7 +30,6 @@ void _POSIX_Semaphore_Delete(
|
||||
_CORE_semaphore_Destroy(
|
||||
&the_semaphore->Semaphore,
|
||||
NULL,
|
||||
0,
|
||||
lock_context
|
||||
);
|
||||
_POSIX_Semaphore_Free( the_semaphore );
|
||||
|
||||
@@ -38,7 +38,6 @@ int sem_post(
|
||||
_CORE_semaphore_Surrender(
|
||||
&the_semaphore->Semaphore,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
return 0;
|
||||
|
||||
@@ -37,7 +37,7 @@ rtems_status_code rtems_barrier_delete(
|
||||
|
||||
_CORE_barrier_Acquire_critical( &the_barrier->Barrier, &lock_context );
|
||||
_Objects_Close( &_Barrier_Information, &the_barrier->Object );
|
||||
_CORE_barrier_Flush( &the_barrier->Barrier, NULL, 0, &lock_context );
|
||||
_CORE_barrier_Flush( &the_barrier->Barrier, NULL, &lock_context );
|
||||
_Barrier_Free( the_barrier );
|
||||
_Objects_Allocator_unlock();
|
||||
return RTEMS_SUCCESSFUL;
|
||||
|
||||
@@ -42,7 +42,6 @@ rtems_status_code rtems_barrier_release(
|
||||
*released = _CORE_barrier_Surrender(
|
||||
&the_barrier->Barrier,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
return RTEMS_SUCCESSFUL;
|
||||
|
||||
@@ -44,7 +44,6 @@ rtems_status_code rtems_barrier_wait(
|
||||
true,
|
||||
timeout,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
return _Barrier_Translate_core_barrier_return_code(
|
||||
|
||||
@@ -54,7 +54,6 @@ rtems_status_code rtems_message_queue_broadcast(
|
||||
buffer,
|
||||
size,
|
||||
_Message_queue_Core_message_queue_mp_support,
|
||||
id,
|
||||
count,
|
||||
&lock_context
|
||||
);
|
||||
|
||||
@@ -53,7 +53,6 @@ rtems_status_code rtems_message_queue_delete(
|
||||
_CORE_message_queue_Close(
|
||||
&the_message_queue->message_queue,
|
||||
_Message_queue_MP_Send_object_was_deleted,
|
||||
id,
|
||||
&lock_context
|
||||
);
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ rtems_status_code rtems_message_queue_send(
|
||||
buffer,
|
||||
size,
|
||||
_Message_queue_Core_message_queue_mp_support,
|
||||
id,
|
||||
false, /* sender does not block */
|
||||
0, /* no timeout */
|
||||
&lock_context
|
||||
|
||||
@@ -53,7 +53,6 @@ rtems_status_code rtems_message_queue_urgent(
|
||||
buffer,
|
||||
size,
|
||||
_Message_queue_Core_message_queue_mp_support,
|
||||
id,
|
||||
false, /* sender does not block */
|
||||
0, /* no timeout */
|
||||
&lock_context
|
||||
|
||||
@@ -101,7 +101,6 @@ rtems_status_code rtems_semaphore_delete(
|
||||
&the_semaphore->Core_control.mutex,
|
||||
_CORE_mutex_Was_deleted,
|
||||
_Semaphore_MP_Send_object_was_deleted,
|
||||
id,
|
||||
&lock_context
|
||||
);
|
||||
_CORE_mutex_Destroy( &the_semaphore->Core_control.mutex );
|
||||
@@ -109,7 +108,6 @@ rtems_status_code rtems_semaphore_delete(
|
||||
_CORE_semaphore_Destroy(
|
||||
&the_semaphore->Core_control.semaphore,
|
||||
_Semaphore_MP_Send_object_was_deleted,
|
||||
id,
|
||||
&lock_context
|
||||
);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ rtems_status_code rtems_semaphore_flush( rtems_id id )
|
||||
&the_semaphore->Core_control.mutex,
|
||||
_CORE_mutex_Unsatisfied_nowait,
|
||||
_Semaphore_MP_Send_object_was_deleted,
|
||||
id,
|
||||
&lock_context
|
||||
);
|
||||
} else {
|
||||
@@ -67,7 +66,6 @@ rtems_status_code rtems_semaphore_flush( rtems_id id )
|
||||
_CORE_semaphore_Flush(
|
||||
&the_semaphore->Core_control.semaphore,
|
||||
_Semaphore_MP_Send_object_was_deleted,
|
||||
id,
|
||||
&lock_context
|
||||
);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ rtems_status_code rtems_semaphore_release( rtems_id id )
|
||||
mutex_status = _CORE_mutex_Surrender(
|
||||
&the_semaphore->Core_control.mutex,
|
||||
_Semaphore_Core_mutex_mp_support,
|
||||
id,
|
||||
&lock_context
|
||||
);
|
||||
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
|
||||
@@ -67,7 +66,6 @@ rtems_status_code rtems_semaphore_release( rtems_id id )
|
||||
semaphore_status = _CORE_semaphore_Surrender(
|
||||
&the_semaphore->Core_control.semaphore,
|
||||
_Semaphore_Core_mutex_mp_support,
|
||||
id,
|
||||
&lock_context
|
||||
);
|
||||
return _Semaphore_Translate_core_semaphore_return_code( semaphore_status );
|
||||
|
||||
@@ -105,7 +105,6 @@ void _CORE_barrier_Do_seize(
|
||||
Watchdog_Interval timeout,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
);
|
||||
@@ -125,7 +124,6 @@ void _CORE_barrier_Do_seize(
|
||||
* to wait if @a wait is true.
|
||||
* @param[in] mp_callout is the routine to invoke if the
|
||||
* thread unblocked is remote
|
||||
* @param[in] mp_id is the id of the object being waited upon
|
||||
*
|
||||
* @note Status is returned via the thread control block.
|
||||
*/
|
||||
@@ -136,7 +134,6 @@ void _CORE_barrier_Do_seize(
|
||||
wait, \
|
||||
timeout, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_barrier_Do_seize( \
|
||||
@@ -145,7 +142,6 @@ void _CORE_barrier_Do_seize(
|
||||
wait, \
|
||||
timeout, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
#else
|
||||
@@ -155,7 +151,6 @@ void _CORE_barrier_Do_seize(
|
||||
wait, \
|
||||
timeout, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_barrier_Do_seize( \
|
||||
@@ -172,7 +167,6 @@ uint32_t _CORE_barrier_Do_surrender(
|
||||
Thread_queue_Flush_filter filter,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
);
|
||||
@@ -186,7 +180,6 @@ uint32_t _CORE_barrier_Do_surrender(
|
||||
* @param[in] the_barrier is the barrier to surrender
|
||||
* @param[in] mp_callout is the routine to invoke if the
|
||||
* thread unblocked is remote
|
||||
* @param[in] mp_id is the id of the object for a remote unblock
|
||||
*
|
||||
* @retval the number of unblocked threads
|
||||
*/
|
||||
@@ -194,21 +187,18 @@ uint32_t _CORE_barrier_Do_surrender(
|
||||
#define _CORE_barrier_Surrender( \
|
||||
the_barrier, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_barrier_Do_surrender( \
|
||||
the_barrier, \
|
||||
_Thread_queue_Flush_default_filter, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
#else
|
||||
#define _CORE_barrier_Surrender( \
|
||||
the_barrier, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_barrier_Do_surrender( \
|
||||
@@ -229,21 +219,18 @@ Thread_Control *_CORE_barrier_Was_deleted(
|
||||
#define _CORE_barrier_Flush( \
|
||||
the_barrier, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_barrier_Do_surrender( \
|
||||
the_barrier, \
|
||||
_CORE_barrier_Was_deleted, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
#else
|
||||
#define _CORE_barrier_Flush( \
|
||||
the_barrier, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_barrier_Do_surrender( \
|
||||
|
||||
@@ -130,7 +130,6 @@ void _CORE_message_queue_Do_close(
|
||||
CORE_message_queue_Control *the_message_queue,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
);
|
||||
@@ -148,7 +147,6 @@ void _CORE_message_queue_Do_close(
|
||||
* @param[in] the_message_queue points to the message queue to close
|
||||
* @param[in] mp_callout is the routine to call for each thread
|
||||
* that is extracted from the set of waiting threads
|
||||
* @param[in] mp_id the object identifier of the message queue object
|
||||
* @param[in] lock_context The lock context of the
|
||||
* _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
|
||||
*/
|
||||
@@ -156,20 +154,17 @@ void _CORE_message_queue_Do_close(
|
||||
#define _CORE_message_queue_Close( \
|
||||
the_message_queue, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_message_queue_Do_close( \
|
||||
the_message_queue, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
#else
|
||||
#define _CORE_message_queue_Close( \
|
||||
the_message_queue, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_message_queue_Do_close( \
|
||||
@@ -221,7 +216,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast(
|
||||
size_t size,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
uint32_t *count,
|
||||
ISR_lock_Context *lock_context
|
||||
@@ -242,8 +236,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast(
|
||||
* @param[in] size is the size of the message being broadcast
|
||||
* @param[in] mp_callout is the routine to invoke if
|
||||
* a thread that is unblocked is actually a remote thread.
|
||||
* @param[in] mp_id is the RTEMS object Id associated with this message queue.
|
||||
* It is used when unblocking a remote thread.
|
||||
* @param[out] count points to the variable that will contain the
|
||||
* number of tasks that are sent this message
|
||||
* @param[in] lock_context The lock context of the interrupt disable.
|
||||
@@ -256,7 +248,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
count, \
|
||||
lock_context \
|
||||
) \
|
||||
@@ -265,7 +256,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
count, \
|
||||
lock_context \
|
||||
)
|
||||
@@ -275,7 +265,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
count, \
|
||||
lock_context \
|
||||
) \
|
||||
@@ -295,7 +284,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
|
||||
size_t size,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
CORE_message_queue_Submit_types submit_type,
|
||||
bool wait,
|
||||
@@ -318,8 +306,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
|
||||
* @param[in] size is the size of the message being send
|
||||
* @param[in] mp_callout is the routine to invoke if
|
||||
* a thread that is unblocked is actually a remote thread.
|
||||
* @param[in] mp_id is the RTEMS object Id associated with this message queue.
|
||||
* It is used when unblocking a remote thread.
|
||||
* @param[in] submit_type determines whether the message is prepended,
|
||||
* appended, or enqueued in priority order.
|
||||
* @param[in] wait indicates whether the calling thread is willing to block
|
||||
@@ -336,7 +322,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
submit_type, \
|
||||
wait, \
|
||||
timeout, \
|
||||
@@ -348,7 +333,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
submit_type, \
|
||||
wait, \
|
||||
timeout, \
|
||||
@@ -361,7 +345,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
submit_type, \
|
||||
wait, \
|
||||
timeout, \
|
||||
@@ -451,7 +434,6 @@ void _CORE_message_queue_Insert_message(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
wait, \
|
||||
timeout, \
|
||||
lock_context \
|
||||
@@ -462,7 +444,6 @@ void _CORE_message_queue_Insert_message(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
CORE_MESSAGE_QUEUE_SEND_REQUEST, \
|
||||
wait, \
|
||||
timeout, \
|
||||
@@ -477,7 +458,6 @@ void _CORE_message_queue_Insert_message(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
wait, \
|
||||
timeout, \
|
||||
lock_context \
|
||||
@@ -488,7 +468,6 @@ void _CORE_message_queue_Insert_message(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
CORE_MESSAGE_QUEUE_URGENT_REQUEST, \
|
||||
wait,\
|
||||
timeout, \
|
||||
@@ -624,7 +603,6 @@ RTEMS_INLINE_ROUTINE Thread_Control *_CORE_message_queue_Do_dequeue_receiver(
|
||||
size_t size,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
CORE_message_queue_Submit_types submit_type,
|
||||
ISR_lock_Context *lock_context
|
||||
@@ -670,7 +648,6 @@ RTEMS_INLINE_ROUTINE Thread_Control *_CORE_message_queue_Do_dequeue_receiver(
|
||||
the_message_queue->operations,
|
||||
the_thread,
|
||||
mp_callout,
|
||||
mp_id,
|
||||
lock_context
|
||||
);
|
||||
|
||||
@@ -683,7 +660,6 @@ RTEMS_INLINE_ROUTINE Thread_Control *_CORE_message_queue_Do_dequeue_receiver(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
submit_type, \
|
||||
lock_context \
|
||||
) \
|
||||
@@ -692,7 +668,6 @@ RTEMS_INLINE_ROUTINE Thread_Control *_CORE_message_queue_Do_dequeue_receiver(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
submit_type, \
|
||||
lock_context \
|
||||
)
|
||||
@@ -702,7 +677,6 @@ RTEMS_INLINE_ROUTINE Thread_Control *_CORE_message_queue_Do_dequeue_receiver(
|
||||
buffer, \
|
||||
size, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
submit_type, \
|
||||
lock_context \
|
||||
) \
|
||||
|
||||
@@ -374,7 +374,6 @@ CORE_mutex_Status _CORE_mutex_Do_surrender(
|
||||
CORE_mutex_Control *the_mutex,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
);
|
||||
@@ -383,20 +382,17 @@ CORE_mutex_Status _CORE_mutex_Do_surrender(
|
||||
#define _CORE_mutex_Surrender( \
|
||||
the_mutex, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_mutex_Do_surrender( \
|
||||
the_mutex, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
#else
|
||||
#define _CORE_mutex_Surrender( \
|
||||
the_mutex, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_mutex_Do_surrender( \
|
||||
@@ -422,7 +418,6 @@ Thread_Control *_CORE_mutex_Unsatisfied_nowait(
|
||||
the_mutex, \
|
||||
filter, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_Thread_queue_Flush_critical( \
|
||||
@@ -430,7 +425,6 @@ Thread_Control *_CORE_mutex_Unsatisfied_nowait(
|
||||
( the_mutex )->operations, \
|
||||
filter, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
|
||||
|
||||
@@ -117,7 +117,6 @@ Thread_Control *_CORE_semaphore_Unsatisfied_nowait(
|
||||
#define _CORE_semaphore_Destroy( \
|
||||
the_semaphore, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
do { \
|
||||
@@ -126,7 +125,6 @@ Thread_Control *_CORE_semaphore_Unsatisfied_nowait(
|
||||
( the_semaphore )->operations, \
|
||||
_CORE_semaphore_Was_deleted, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
); \
|
||||
_Thread_queue_Destroy( &( the_semaphore )->Wait_queue ); \
|
||||
@@ -136,7 +134,6 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Do_surrender(
|
||||
CORE_semaphore_Control *the_semaphore,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
)
|
||||
@@ -158,7 +155,6 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Do_surrender(
|
||||
the_semaphore->operations,
|
||||
the_thread,
|
||||
mp_callout,
|
||||
mp_id,
|
||||
lock_context
|
||||
);
|
||||
} else {
|
||||
@@ -183,8 +179,6 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Do_surrender(
|
||||
* @param[in] the_semaphore is the semaphore to surrender
|
||||
* @param[in] mp_callout is the routine to invoke if the
|
||||
* thread unblocked is remote
|
||||
* @param[in] mp_id is the Id of the API level Semaphore object associated
|
||||
* with this instance of a SuperCore Semaphore
|
||||
* @param[in] lock_context is a temporary variable used to contain the ISR
|
||||
* disable level cookie
|
||||
*
|
||||
@@ -194,20 +188,17 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Do_surrender(
|
||||
#define _CORE_semaphore_Surrender( \
|
||||
the_semaphore, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_semaphore_Do_surrender( \
|
||||
the_semaphore, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
#else
|
||||
#define _CORE_semaphore_Surrender( \
|
||||
the_semaphore, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_CORE_semaphore_Do_surrender( \
|
||||
@@ -220,7 +211,6 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Do_surrender(
|
||||
#define _CORE_semaphore_Flush( \
|
||||
the_semaphore, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
do { \
|
||||
@@ -229,7 +219,6 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Do_surrender(
|
||||
( the_semaphore )->operations, \
|
||||
_CORE_semaphore_Unsatisfied_nowait, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
); \
|
||||
} while ( 0 )
|
||||
|
||||
@@ -403,12 +403,6 @@ typedef struct {
|
||||
*/
|
||||
Thread_queue_MP_callout thread_queue_callout;
|
||||
|
||||
/**
|
||||
* @brief Thread queue object identifier for
|
||||
* _Thread_queue_Enqueue_critical().
|
||||
*/
|
||||
Objects_Id thread_queue_id;
|
||||
|
||||
/**
|
||||
* @brief This field is used to manage the set of active proxies in the system.
|
||||
*/
|
||||
|
||||
@@ -201,8 +201,7 @@ Thread_Control *_Thread_queue_Do_dequeue(
|
||||
const Thread_queue_Operations *operations
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
,
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id
|
||||
Thread_queue_MP_callout mp_callout
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -221,21 +220,18 @@ Thread_Control *_Thread_queue_Do_dequeue(
|
||||
#define _Thread_queue_Dequeue( \
|
||||
the_thread_queue, \
|
||||
operations, \
|
||||
mp_callout, \
|
||||
mp_id \
|
||||
mp_callout \
|
||||
) \
|
||||
_Thread_queue_Do_dequeue( \
|
||||
the_thread_queue, \
|
||||
operations, \
|
||||
mp_callout, \
|
||||
mp_id \
|
||||
mp_callout \
|
||||
)
|
||||
#else
|
||||
#define _Thread_queue_Dequeue( \
|
||||
the_thread_queue, \
|
||||
operations, \
|
||||
mp_callout, \
|
||||
mp_id \
|
||||
mp_callout \
|
||||
) \
|
||||
_Thread_queue_Do_dequeue( \
|
||||
the_thread_queue, \
|
||||
@@ -348,8 +344,7 @@ bool _Thread_queue_Do_extract_locked(
|
||||
Thread_Control *the_thread
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
,
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id
|
||||
Thread_queue_MP_callout mp_callout
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -366,8 +361,6 @@ bool _Thread_queue_Do_extract_locked(
|
||||
* @param[in] mp_callout Callout to unblock the thread in case it is actually a
|
||||
* thread proxy. This parameter is only used on multiprocessing
|
||||
* configurations.
|
||||
* @param[in] mp_id Object identifier of the object containing the thread
|
||||
* queue. This parameter is only used on multiprocessing configurations.
|
||||
*
|
||||
* @return Returns the unblock indicator for _Thread_queue_Unblock_critical().
|
||||
* True indicates, that this thread must be unblocked by the scheduler later in
|
||||
@@ -382,23 +375,20 @@ bool _Thread_queue_Do_extract_locked(
|
||||
unblock, \
|
||||
queue, \
|
||||
the_thread, \
|
||||
mp_callout, \
|
||||
mp_id \
|
||||
mp_callout \
|
||||
) \
|
||||
_Thread_queue_Do_extract_locked( \
|
||||
unblock, \
|
||||
queue, \
|
||||
the_thread, \
|
||||
mp_callout, \
|
||||
mp_id \
|
||||
mp_callout \
|
||||
)
|
||||
#else
|
||||
#define _Thread_queue_Extract_locked( \
|
||||
unblock, \
|
||||
queue, \
|
||||
the_thread, \
|
||||
mp_callout, \
|
||||
mp_id \
|
||||
mp_callout \
|
||||
) \
|
||||
_Thread_queue_Do_extract_locked( \
|
||||
unblock, \
|
||||
@@ -434,7 +424,6 @@ void _Thread_queue_Do_extract_critical(
|
||||
Thread_Control *the_thread,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
);
|
||||
@@ -487,8 +476,6 @@ void _Thread_queue_Do_extract_critical(
|
||||
* @param[in] mp_callout Callout to unblock the thread in case it is actually a
|
||||
* thread proxy. This parameter is only used on multiprocessing
|
||||
* configurations.
|
||||
* @param[in] mp_id Object identifier of the object containing the thread
|
||||
* queue. This parameter is only used on multiprocessing configurations.
|
||||
* @param[in] lock_context The lock context of the lock acquire.
|
||||
*/
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
@@ -497,7 +484,6 @@ void _Thread_queue_Do_extract_critical(
|
||||
operations, \
|
||||
the_thread, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_Thread_queue_Do_extract_critical( \
|
||||
@@ -505,7 +491,6 @@ void _Thread_queue_Do_extract_critical(
|
||||
operations, \
|
||||
the_thread, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
#else
|
||||
@@ -514,7 +499,6 @@ void _Thread_queue_Do_extract_critical(
|
||||
operations, \
|
||||
the_thread, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_Thread_queue_Do_extract_critical( \
|
||||
@@ -644,7 +628,6 @@ size_t _Thread_queue_Do_flush_critical(
|
||||
Thread_queue_Flush_filter filter,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
);
|
||||
@@ -666,8 +649,6 @@ size_t _Thread_queue_Do_flush_critical(
|
||||
* operation should stop or continue.
|
||||
* @param mp_callout Callout to extract the proxy of a remote thread. This
|
||||
* parameter is only used on multiprocessing configurations.
|
||||
* @param mp_id Object identifier of the object containing the thread queue.
|
||||
* This parameter is only used on multiprocessing configurations.
|
||||
*
|
||||
* @return The count of extracted threads.
|
||||
*/
|
||||
@@ -677,7 +658,6 @@ size_t _Thread_queue_Do_flush_critical(
|
||||
operations, \
|
||||
filter, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_Thread_queue_Do_flush_critical( \
|
||||
@@ -685,7 +665,6 @@ size_t _Thread_queue_Do_flush_critical(
|
||||
operations, \
|
||||
filter, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
)
|
||||
#else
|
||||
@@ -694,7 +673,6 @@ size_t _Thread_queue_Do_flush_critical(
|
||||
operations, \
|
||||
filter, \
|
||||
mp_callout, \
|
||||
mp_id, \
|
||||
lock_context \
|
||||
) \
|
||||
_Thread_queue_Do_flush_critical( \
|
||||
|
||||
@@ -35,7 +35,6 @@ void _API_Mutex_Unlock( API_Mutex_Control *the_mutex )
|
||||
_CORE_mutex_Surrender(
|
||||
&the_mutex->Mutex,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
|
||||
|
||||
@@ -267,7 +267,6 @@ static void _Condition_Wake( struct _Condition_Control *_condition, int count )
|
||||
CONDITION_TQ_OPERATIONS,
|
||||
_Condition_Flush_filter,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context.Base
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ uint32_t _CORE_barrier_Do_surrender(
|
||||
Thread_queue_Flush_filter filter,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
)
|
||||
@@ -37,7 +36,6 @@ uint32_t _CORE_barrier_Do_surrender(
|
||||
CORE_BARRIER_TQ_OPERATIONS,
|
||||
filter,
|
||||
mp_callout,
|
||||
mp_id,
|
||||
lock_context
|
||||
);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ void _CORE_barrier_Do_seize(
|
||||
Watchdog_Interval timeout,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
)
|
||||
@@ -47,7 +46,7 @@ void _CORE_barrier_Do_seize(
|
||||
&& number_of_waiting_threads == the_barrier->Attributes.maximum_count
|
||||
) {
|
||||
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
|
||||
_CORE_barrier_Surrender( the_barrier, mp_callout, mp_id, lock_context );
|
||||
_CORE_barrier_Surrender( the_barrier, mp_callout, lock_context );
|
||||
} else {
|
||||
the_barrier->number_of_waiting_threads = number_of_waiting_threads;
|
||||
_Thread_queue_Enqueue_critical(
|
||||
|
||||
@@ -27,7 +27,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast(
|
||||
size_t size,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
uint32_t *count,
|
||||
ISR_lock_Context *lock_context
|
||||
@@ -52,7 +51,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast(
|
||||
buffer,
|
||||
size,
|
||||
mp_callout,
|
||||
mp_id,
|
||||
0,
|
||||
lock_context
|
||||
)
|
||||
|
||||
@@ -36,7 +36,6 @@ void _CORE_message_queue_Do_close(
|
||||
CORE_message_queue_Control *the_message_queue,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
)
|
||||
@@ -52,7 +51,6 @@ void _CORE_message_queue_Do_close(
|
||||
the_message_queue->operations,
|
||||
_CORE_message_queue_Was_deleted,
|
||||
mp_callout,
|
||||
mp_id,
|
||||
lock_context
|
||||
);
|
||||
|
||||
|
||||
@@ -101,7 +101,6 @@ void _CORE_message_queue_Seize(
|
||||
the_message_queue->operations,
|
||||
the_thread,
|
||||
NULL,
|
||||
0,
|
||||
lock_context
|
||||
);
|
||||
return;
|
||||
|
||||
@@ -32,7 +32,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
|
||||
size_t size,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
CORE_message_queue_Submit_types submit_type,
|
||||
bool wait,
|
||||
@@ -57,7 +56,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
|
||||
buffer,
|
||||
size,
|
||||
mp_callout,
|
||||
mp_id,
|
||||
submit_type,
|
||||
lock_context
|
||||
);
|
||||
|
||||
@@ -27,7 +27,6 @@ CORE_mutex_Status _CORE_mutex_Do_surrender(
|
||||
CORE_mutex_Control *the_mutex,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
)
|
||||
@@ -127,8 +126,7 @@ CORE_mutex_Status _CORE_mutex_Do_surrender(
|
||||
&the_mutex->Wait_queue.Queue,
|
||||
the_mutex->operations,
|
||||
the_thread,
|
||||
mp_callout,
|
||||
mp_id
|
||||
mp_callout
|
||||
);
|
||||
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
|
||||
@@ -120,7 +120,6 @@ CORE_RWLock_Status _CORE_RWLock_Surrender(
|
||||
CORE_RWLOCK_TQ_OPERATIONS,
|
||||
_CORE_RWLock_Flush_filter,
|
||||
NULL,
|
||||
0,
|
||||
lock_context
|
||||
);
|
||||
return CORE_RWLOCK_SUCCESSFUL;
|
||||
|
||||
@@ -151,7 +151,6 @@ int _Futex_Wake( struct _Futex_Control *_futex, int count )
|
||||
FUTEX_TQ_OPERATIONS,
|
||||
_Futex_Flush_filter,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context.Base
|
||||
);
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ void _MPCI_Announce ( void )
|
||||
ISR_lock_Context lock_context;
|
||||
|
||||
_ISR_lock_ISR_disable( &lock_context );
|
||||
(void) _CORE_semaphore_Surrender( &_MPCI_Semaphore, 0, 0, &lock_context );
|
||||
(void) _CORE_semaphore_Surrender( &_MPCI_Semaphore, 0, &lock_context );
|
||||
}
|
||||
|
||||
void _MPCI_Internal_packets_Send_process_packet (
|
||||
|
||||
@@ -146,8 +146,7 @@ static void _Mutex_Release_slow(
|
||||
&mutex->Queue.Queue,
|
||||
operations,
|
||||
first,
|
||||
NULL,
|
||||
0
|
||||
NULL
|
||||
);
|
||||
_Thread_queue_Boost_priority( &mutex->Queue.Queue, first );
|
||||
_Thread_queue_Unblock_critical(
|
||||
|
||||
@@ -134,7 +134,6 @@ void _Semaphore_Post( struct _Semaphore_Control *_sem )
|
||||
operations,
|
||||
first,
|
||||
NULL,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
}
|
||||
|
||||
@@ -99,8 +99,7 @@ bool _Thread_queue_Do_extract_locked(
|
||||
Thread_Control *the_thread
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
,
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id
|
||||
Thread_queue_MP_callout mp_callout
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -115,7 +114,6 @@ bool _Thread_queue_Do_extract_locked(
|
||||
|
||||
the_proxy = (Thread_Proxy_control *) the_thread;
|
||||
the_proxy->thread_queue_callout = mp_callout;
|
||||
the_proxy->thread_queue_id = mp_id;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -172,7 +170,6 @@ void _Thread_queue_Do_extract_critical(
|
||||
Thread_Control *the_thread,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
)
|
||||
@@ -183,8 +180,7 @@ void _Thread_queue_Do_extract_critical(
|
||||
queue,
|
||||
operations,
|
||||
the_thread,
|
||||
mp_callout,
|
||||
mp_id
|
||||
mp_callout
|
||||
);
|
||||
|
||||
_Thread_queue_Unblock_critical(
|
||||
@@ -213,7 +209,6 @@ void _Thread_queue_Extract( Thread_Control *the_thread )
|
||||
the_thread->Wait.operations,
|
||||
the_thread,
|
||||
_Thread_queue_MP_callout_do_nothing,
|
||||
0,
|
||||
&lock_context
|
||||
);
|
||||
} else {
|
||||
@@ -226,8 +221,7 @@ Thread_Control *_Thread_queue_Do_dequeue(
|
||||
const Thread_queue_Operations *operations
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
,
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id
|
||||
Thread_queue_MP_callout mp_callout
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -246,7 +240,6 @@ Thread_Control *_Thread_queue_Do_dequeue(
|
||||
operations,
|
||||
the_thread,
|
||||
mp_callout,
|
||||
mp_id,
|
||||
&lock_context
|
||||
);
|
||||
} else {
|
||||
@@ -262,13 +255,14 @@ void _Thread_queue_Unblock_proxy(
|
||||
Thread_Control *the_thread
|
||||
)
|
||||
{
|
||||
Thread_Proxy_control *the_proxy;
|
||||
const Thread_queue_Object *the_queue_object;
|
||||
Thread_Proxy_control *the_proxy;
|
||||
Thread_queue_MP_callout mp_callout;
|
||||
|
||||
the_queue_object = THREAD_QUEUE_QUEUE_TO_OBJECT( queue );
|
||||
the_proxy = (Thread_Proxy_control *) the_thread;
|
||||
( *the_proxy->thread_queue_callout )(
|
||||
the_thread,
|
||||
the_proxy->thread_queue_id
|
||||
);
|
||||
mp_callout = the_proxy->thread_queue_callout;
|
||||
( *mp_callout )( the_thread, the_queue_object->Object.id );
|
||||
|
||||
_Thread_MP_Free_proxy( the_thread );
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ size_t _Thread_queue_Do_flush_critical(
|
||||
Thread_queue_Flush_filter filter,
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
Thread_queue_MP_callout mp_callout,
|
||||
Objects_Id mp_id,
|
||||
#endif
|
||||
ISR_lock_Context *lock_context
|
||||
)
|
||||
@@ -70,8 +69,7 @@ size_t _Thread_queue_Do_flush_critical(
|
||||
queue,
|
||||
operations,
|
||||
first,
|
||||
mp_callout,
|
||||
mp_id
|
||||
mp_callout
|
||||
);
|
||||
if ( do_unblock ) {
|
||||
_Chain_Append_unprotected( &unblock, &first->Wait.Node.Chain );
|
||||
|
||||
@@ -128,7 +128,6 @@ static void _Thread_Wake_up_joining_threads( Thread_Control *the_thread )
|
||||
_Thread_queue_Flush_default_filter,
|
||||
#endif
|
||||
NULL,
|
||||
0,
|
||||
&join_lock_context.Base
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user