From 93306058c0417b1c6e950b44ef279e096062dfba Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 27 May 2016 14:43:19 +0200 Subject: score: _CORE_mutex_Check_dispatch_for_seize() Move the safety check performed by _CORE_mutex_Check_dispatch_for_seize() out of the performance critical path and generalize it. Blocking on a thread queue with an unexpected thread dispatch disabled level is illegal in all system states. Add the expected thread dispatch disable level (which may be 1 or 2 depending on the operation) to Thread_queue_Context and use it in _Thread_queue_Enqueue_critical(). --- cpukit/score/src/mpci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpukit/score/src/mpci.c') diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c index 1e26b1f3ce..8c61e23b0f 100644 --- a/cpukit/score/src/mpci.c +++ b/cpukit/score/src/mpci.c @@ -259,7 +259,8 @@ Status_Control _MPCI_Send_request_packet( &_Thread_queue_Operations_FIFO, executing, STATES_WAITING_FOR_RPC_REPLY | extra_state, - the_packet->timeout + the_packet->timeout, + 2 ); _Thread_Dispatch_enable( cpu_self ); -- cgit v1.2.3