summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/coremsgimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-26 21:18:52 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-02 07:46:14 +0200
commit7580995b477dab82163e17e021894f5d982e314f (patch)
tree562047285cc416cca278d00976765a5e04f6c612 /cpukit/score/include/rtems/score/coremsgimpl.h
parentposix: Delete POSIX_Message_queue_Control::named (diff)
downloadrtems-7580995b477dab82163e17e021894f5d982e314f.tar.bz2
score: _CORE_message_queue_Close()
Move lock acquire to caller of _CORE_message_queue_Close() to allow state checks during object close operations under lock protection. Ensures deletion safety on uni-processor configuration.
Diffstat (limited to 'cpukit/score/include/rtems/score/coremsgimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/coremsgimpl.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/cpukit/score/include/rtems/score/coremsgimpl.h b/cpukit/score/include/rtems/score/coremsgimpl.h
index 98d97ddbdb..b9e4be4669 100644
--- a/cpukit/score/include/rtems/score/coremsgimpl.h
+++ b/cpukit/score/include/rtems/score/coremsgimpl.h
@@ -129,12 +129,12 @@ bool _CORE_message_queue_Initialize(
);
void _CORE_message_queue_Do_close(
- CORE_message_queue_Control *the_message_queue
+ CORE_message_queue_Control *the_message_queue,
#if defined(RTEMS_MULTIPROCESSING)
- ,
Thread_queue_MP_callout mp_callout,
- Objects_Id mp_id
+ Objects_Id mp_id,
#endif
+ ISR_lock_Context *lock_context
);
/**
@@ -151,26 +151,32 @@ void _CORE_message_queue_Do_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().
*/
#if defined(RTEMS_MULTIPROCESSING)
#define _CORE_message_queue_Close( \
the_message_queue, \
mp_callout, \
- mp_id \
+ mp_id, \
+ lock_context \
) \
_CORE_message_queue_Do_close( \
the_message_queue, \
mp_callout, \
- mp_id \
+ mp_id, \
+ lock_context \
)
#else
#define _CORE_message_queue_Close( \
the_message_queue, \
mp_callout, \
- mp_id \
+ mp_id, \
+ lock_context \
) \
_CORE_message_queue_Do_close( \
- the_message_queue \
+ the_message_queue, \
+ lock_context \
)
#endif