mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 19:37:25 +08:00
score: Objects_Thread_queue_Extract_callout
Change parameters of the objects thread queue extract callout to avoid a cast and explicit use of the thread wait information.
This commit is contained in:
@@ -163,7 +163,8 @@ void _Message_queue_MP_Send_object_was_deleted (
|
||||
* the remote node must be informed of this.
|
||||
*/
|
||||
void _Message_queue_MP_Send_extract_proxy (
|
||||
void *argument
|
||||
Thread_Control *the_thread,
|
||||
Objects_Id id
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -133,7 +133,8 @@ void _Partition_MP_Process_packet (
|
||||
* the remote node must be informed of this.
|
||||
*/
|
||||
void _Partition_MP_Send_extract_proxy (
|
||||
void *argument
|
||||
Thread_Control *the_thread,
|
||||
Objects_Id id
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -138,7 +138,8 @@ void _Region_MP_Process_packet (
|
||||
* the remote node must be informed of this.
|
||||
*/
|
||||
void _Region_MP_Send_extract_proxy (
|
||||
void *argument
|
||||
Thread_Control *the_thread,
|
||||
Objects_Id id
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,7 +132,8 @@ void _Semaphore_MP_Send_object_was_deleted (
|
||||
* the remote node must be informed of this.
|
||||
*/
|
||||
void _Semaphore_MP_Send_extract_proxy (
|
||||
void *argument
|
||||
Thread_Control *the_thread,
|
||||
Objects_Id id
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -453,14 +453,13 @@ void _Message_queue_MP_Send_object_was_deleted (
|
||||
*/
|
||||
|
||||
void _Message_queue_MP_Send_extract_proxy (
|
||||
void *argument
|
||||
Thread_Control *the_thread,
|
||||
Objects_Id id
|
||||
)
|
||||
{
|
||||
Thread_Control *the_thread = (Thread_Control *)argument;
|
||||
|
||||
_Message_queue_MP_Send_process_packet(
|
||||
MESSAGE_QUEUE_MP_EXTRACT_PROXY,
|
||||
the_thread->Wait.id,
|
||||
id,
|
||||
(rtems_name) 0,
|
||||
the_thread->Object.id
|
||||
);
|
||||
|
||||
@@ -275,14 +275,13 @@ void _Partition_MP_Process_packet (
|
||||
*/
|
||||
|
||||
void _Partition_MP_Send_extract_proxy (
|
||||
void *argument
|
||||
Thread_Control *the_thread,
|
||||
Objects_Id id
|
||||
)
|
||||
{
|
||||
Thread_Control *the_thread = (Thread_Control *)argument;
|
||||
|
||||
_Partition_MP_Send_process_packet(
|
||||
PARTITION_MP_EXTRACT_PROXY,
|
||||
the_thread->Wait.id,
|
||||
id,
|
||||
(rtems_name) 0,
|
||||
the_thread->Object.id
|
||||
);
|
||||
|
||||
@@ -259,14 +259,13 @@ void _Region_MP_Process_packet (
|
||||
*/
|
||||
|
||||
void _Region_MP_Send_extract_proxy (
|
||||
void *argument
|
||||
Thread_Control *the_thread,
|
||||
Objects_Id id
|
||||
)
|
||||
{
|
||||
Thread_Control *the_thread = (Thread_Control *)argument;
|
||||
|
||||
_Region_MP_Send_process_packet(
|
||||
REGION_MP_EXTRACT_PROXY,
|
||||
the_thread->Wait.id,
|
||||
id,
|
||||
(rtems_name) 0,
|
||||
the_thread->Object.id
|
||||
);
|
||||
|
||||
@@ -247,14 +247,13 @@ void _Semaphore_MP_Send_object_was_deleted (
|
||||
}
|
||||
|
||||
void _Semaphore_MP_Send_extract_proxy (
|
||||
void *argument
|
||||
Thread_Control *the_thread,
|
||||
Objects_Id id
|
||||
)
|
||||
{
|
||||
Thread_Control *the_thread = (Thread_Control *)argument;
|
||||
|
||||
_Semaphore_MP_Send_process_packet(
|
||||
SEMAPHORE_MP_EXTRACT_PROXY,
|
||||
the_thread->Wait.id,
|
||||
id,
|
||||
(rtems_name) 0,
|
||||
the_thread->Object.id
|
||||
);
|
||||
|
||||
@@ -127,7 +127,10 @@ typedef enum {
|
||||
* is extracted from a remote thread queue (i.e. it's proxy must
|
||||
* extracted from the remote queue).
|
||||
*/
|
||||
typedef void ( *Objects_Thread_queue_Extract_callout )( void * );
|
||||
typedef void ( *Objects_Thread_queue_Extract_callout )(
|
||||
Thread_Control *,
|
||||
Objects_Id
|
||||
);
|
||||
|
||||
/**
|
||||
* The following defines the structure for the information used to
|
||||
|
||||
@@ -37,14 +37,16 @@ void _Thread_queue_Extract_with_proxy(
|
||||
state = the_thread->current_state;
|
||||
if ( _States_Is_waiting_for_rpc_reply( state ) &&
|
||||
_States_Is_locally_blocked( state ) ) {
|
||||
Objects_Id id;
|
||||
Objects_Information *the_information;
|
||||
Objects_Thread_queue_Extract_callout proxy_extract_callout;
|
||||
|
||||
the_information = _Objects_Get_information_id( the_thread->Wait.id );
|
||||
id = the_thread->Wait.id;
|
||||
the_information = _Objects_Get_information_id( id );
|
||||
proxy_extract_callout = the_information->extract;
|
||||
|
||||
if ( proxy_extract_callout != NULL )
|
||||
(*proxy_extract_callout)( the_thread );
|
||||
(*proxy_extract_callout)( the_thread, id );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user