diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-30 13:12:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-05-19 12:00:46 +0200 |
commit | cc18d7bec7b3c5515cb9e6cd9771d4b94309b3bd (patch) | |
tree | 59fd8c8ca70830762e632e255a2078f22ac6a821 /cpukit/score/src/coremsginsert.c | |
parent | score: Delete _CORE_message_queue_Flush_support() (diff) | |
download | rtems-cc18d7bec7b3c5515cb9e6cd9771d4b94309b3bd.tar.bz2 |
score: Fine grained locking for message queues
Aggregate several critical sections into a bigger one. Sending and
receiving messages is now protected by an ISR lock. Thread dispatching
is only disabled in case a blocking operation is necessary. The message
copy procedure is done inside the critical section (interrupts
disabled). Thus this change may have a negative impact on the interrupt
latency in case very large messages are transferred.
Update #2273.
Diffstat (limited to 'cpukit/score/src/coremsginsert.c')
-rw-r--r-- | cpukit/score/src/coremsginsert.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/cpukit/score/src/coremsginsert.c b/cpukit/score/src/coremsginsert.c index 28407bae98..0a73af8c71 100644 --- a/cpukit/score/src/coremsginsert.c +++ b/cpukit/score/src/coremsginsert.c @@ -19,7 +19,6 @@ #endif #include <rtems/score/coremsgimpl.h> -#include <rtems/score/isrlevel.h> #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) static bool _CORE_message_queue_Order( @@ -45,7 +44,6 @@ void _CORE_message_queue_Insert_message( ) { Chain_Control *pending_messages; - ISR_Level level; #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) bool notify; #endif @@ -53,8 +51,6 @@ void _CORE_message_queue_Insert_message( _CORE_message_queue_Set_message_priority( the_message, submit_type ); pending_messages = &the_message_queue->Pending_messages; - _ISR_Disable( level ); - #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) notify = ( the_message_queue->number_of_pending_messages == 0 ); #endif @@ -74,8 +70,6 @@ void _CORE_message_queue_Insert_message( _Chain_Prepend_unprotected( pending_messages, &the_message->Node ); } - _ISR_Enable( level ); - #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) /* * According to POSIX, does this happen before or after the message |