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:
Sebastian Huber
2016-03-30 08:45:58 +02:00
parent 06f68a96b1
commit 9d9b6b56d1
10 changed files with 28 additions and 23 deletions
+2 -1
View File
@@ -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
);
/**
+2 -1
View File
@@ -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
);
/**
+2 -1
View File
@@ -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
);
/**
+2 -1
View File
@@ -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
);
/**
+3 -4
View File
@@ -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
);
+3 -4
View File
@@ -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
);
+3 -4
View File
@@ -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
);
+3 -4
View File
@@ -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
+4 -2
View File
@@ -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