From 99112f76b80ed69f2f865f5c559444a3ac74949a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 27 Apr 2016 16:21:07 +0200 Subject: score: _CORE_message_queue_Submit() Move lock acquire to caller of _CORE_message_queue_Submit() to allow state checks during send operations under lock protection. --- cpukit/score/src/coremsgsubmit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cpukit/score/src/coremsgsubmit.c') diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c index f63fa39f39..61d1330a9d 100644 --- a/cpukit/score/src/coremsgsubmit.c +++ b/cpukit/score/src/coremsgsubmit.c @@ -44,12 +44,10 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit( Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { - _ISR_lock_ISR_enable( lock_context ); + _CORE_message_queue_Release( the_message_queue, lock_context ); return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; } - _CORE_message_queue_Acquire_critical( the_message_queue, lock_context ); - /* * Is there a thread currently waiting on this message queue? */ -- cgit v1.2.3