summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-30 11:39:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-06 09:08:20 +0200
commit9809d6e08264525ea58839b98e6d90121b841196 (patch)
tree7ccbdd61436c18d1e1bae9033a3907afb5bff629 /cpukit/rtems
parentscore: Fix _Thread_queue_Extract_locked() (diff)
downloadrtems-9809d6e08264525ea58839b98e6d90121b841196.tar.bz2
score: _Thread_queue_Flush() parameter changes
Change _Thread_queue_Flush() into a macro that invokes _Thread_queue_Do_flush() with the parameter set defined by RTEMS_MULTIPROCESSING. For multiprocessing configurations add the object identifier to avoid direct use of the thread wait information. Use mp_ prefix for multiprocessing related parameters. Rename Thread_queue_Flush_callout to Thread_queue_MP_callout since this type will be re-used later for other operations as well.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/include/rtems/rtems/msgmp.h3
-rw-r--r--cpukit/rtems/include/rtems/rtems/semmp.h3
-rw-r--r--cpukit/rtems/src/barrierdelete.c3
-rw-r--r--cpukit/rtems/src/msgmp.c5
-rw-r--r--cpukit/rtems/src/msgqdelete.c9
-rw-r--r--cpukit/rtems/src/semdelete.c16
-rw-r--r--cpukit/rtems/src/semflush.c16
-rw-r--r--cpukit/rtems/src/semmp.c5
8 files changed, 27 insertions, 33 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/msgmp.h b/cpukit/rtems/include/rtems/rtems/msgmp.h
index f3c31f23fb..436e287497 100644
--- a/cpukit/rtems/include/rtems/rtems/msgmp.h
+++ b/cpukit/rtems/include/rtems/rtems/msgmp.h
@@ -152,7 +152,8 @@ void _Message_queue_MP_Process_packet (
* the remote node must be informed of this.
*/
void _Message_queue_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
+ Thread_Control *the_proxy,
+ Objects_Id mp_id
);
/**
diff --git a/cpukit/rtems/include/rtems/rtems/semmp.h b/cpukit/rtems/include/rtems/rtems/semmp.h
index 9c9a1e653d..74f9400d5d 100644
--- a/cpukit/rtems/include/rtems/rtems/semmp.h
+++ b/cpukit/rtems/include/rtems/rtems/semmp.h
@@ -121,7 +121,8 @@ void _Semaphore_MP_Process_packet (
* the remote node must be informed of this.
*/
void _Semaphore_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
+ Thread_Control *the_proxy,
+ Objects_Id mp_id
);
/**
diff --git a/cpukit/rtems/src/barrierdelete.c b/cpukit/rtems/src/barrierdelete.c
index 2ea15502b3..9ddfe01145 100644
--- a/cpukit/rtems/src/barrierdelete.c
+++ b/cpukit/rtems/src/barrierdelete.c
@@ -35,8 +35,9 @@ rtems_status_code rtems_barrier_delete(
case OBJECTS_LOCAL:
_CORE_barrier_Flush(
&the_barrier->Barrier,
+ CORE_BARRIER_WAS_DELETED,
NULL,
- CORE_BARRIER_WAS_DELETED
+ id
);
_Objects_Close( &_Barrier_Information, &the_barrier->Object );
diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
index 53077c4863..3f27068ad8 100644
--- a/cpukit/rtems/src/msgmp.c
+++ b/cpukit/rtems/src/msgmp.c
@@ -435,14 +435,15 @@ void _Message_queue_MP_Process_packet (
*/
void _Message_queue_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
+ Thread_Control *the_proxy,
+ Objects_Id mp_id
)
{
the_proxy->receive_packet->return_code = RTEMS_OBJECT_WAS_DELETED;
_Message_queue_MP_Send_response_packet(
MESSAGE_QUEUE_MP_RECEIVE_RESPONSE,
- the_proxy->Wait.id,
+ mp_id,
the_proxy
);
}
diff --git a/cpukit/rtems/src/msgqdelete.c b/cpukit/rtems/src/msgqdelete.c
index e2df2b9d9a..d6e773d99f 100644
--- a/cpukit/rtems/src/msgqdelete.c
+++ b/cpukit/rtems/src/msgqdelete.c
@@ -47,12 +47,9 @@ rtems_status_code rtems_message_queue_delete(
_CORE_message_queue_Close(
&the_message_queue->message_queue,
- #if defined(RTEMS_MULTIPROCESSING)
- _Message_queue_MP_Send_object_was_deleted,
- #else
- NULL,
- #endif
- CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED
+ CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED,
+ _Message_queue_MP_Send_object_was_deleted,
+ id
);
#if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/semdelete.c b/cpukit/rtems/src/semdelete.c
index e9c3ad21e9..6a83d25390 100644
--- a/cpukit/rtems/src/semdelete.c
+++ b/cpukit/rtems/src/semdelete.c
@@ -31,12 +31,6 @@
#include <rtems/score/interr.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#define SEMAPHORE_MP_OBJECT_WAS_DELETED _Semaphore_MP_Send_object_was_deleted
-#else
-#define SEMAPHORE_MP_OBJECT_WAS_DELETED NULL
-#endif
-
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
@@ -73,15 +67,17 @@ rtems_status_code rtems_semaphore_delete(
}
_CORE_mutex_Flush(
&the_semaphore->Core_control.mutex,
- SEMAPHORE_MP_OBJECT_WAS_DELETED,
- CORE_MUTEX_WAS_DELETED
+ CORE_MUTEX_WAS_DELETED,
+ _Semaphore_MP_Send_object_was_deleted,
+ id
);
_CORE_mutex_Destroy( &the_semaphore->Core_control.mutex );
} else {
_CORE_semaphore_Flush(
&the_semaphore->Core_control.semaphore,
- SEMAPHORE_MP_OBJECT_WAS_DELETED,
- CORE_SEMAPHORE_WAS_DELETED
+ CORE_SEMAPHORE_WAS_DELETED,
+ _Semaphore_MP_Send_object_was_deleted,
+ id
);
_CORE_semaphore_Destroy( &the_semaphore->Core_control.semaphore );
}
diff --git a/cpukit/rtems/src/semflush.c b/cpukit/rtems/src/semflush.c
index b9b1ec6992..ea06883379 100644
--- a/cpukit/rtems/src/semflush.c
+++ b/cpukit/rtems/src/semflush.c
@@ -31,12 +31,6 @@
#include <rtems/score/interr.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#define SEND_OBJECT_WAS_DELETED _Semaphore_MP_Send_object_was_deleted
-#else
-#define SEND_OBJECT_WAS_DELETED NULL
-#endif
-
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
@@ -59,14 +53,16 @@ rtems_status_code rtems_semaphore_flush(
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
_CORE_mutex_Flush(
&the_semaphore->Core_control.mutex,
- SEND_OBJECT_WAS_DELETED,
- CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
+ CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT,
+ _Semaphore_MP_Send_object_was_deleted,
+ id
);
} else {
_CORE_semaphore_Flush(
&the_semaphore->Core_control.semaphore,
- SEND_OBJECT_WAS_DELETED,
- CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
+ CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT,
+ _Semaphore_MP_Send_object_was_deleted,
+ id
);
}
_Objects_Put( &the_semaphore->Object );
diff --git a/cpukit/rtems/src/semmp.c b/cpukit/rtems/src/semmp.c
index 90432c1738..752831e59b 100644
--- a/cpukit/rtems/src/semmp.c
+++ b/cpukit/rtems/src/semmp.c
@@ -233,14 +233,15 @@ void _Semaphore_MP_Process_packet (
}
void _Semaphore_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
+ Thread_Control *the_proxy,
+ Objects_Id mp_id
)
{
the_proxy->receive_packet->return_code = RTEMS_OBJECT_WAS_DELETED;
_Semaphore_MP_Send_response_packet(
SEMAPHORE_MP_OBTAIN_RESPONSE,
- the_proxy->Wait.id,
+ mp_id,
the_proxy
);