summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremsgseize.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-07 15:33:33 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-07 15:33:33 +0000
commitc961c06bbe213139b817e495fdba0eb64d5353a1 (patch)
treea8f86f4c39ad63995941a8b0e9d03381fc9d6c67 /cpukit/score/src/coremsgseize.c
parent2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-c961c06bbe213139b817e495fdba0eb64d5353a1.tar.bz2
2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/inline/rtems/score/isr.inl: Fix spacing. * score/src/apimutexallocate.c: Fix spacing. * score/src/coremsgseize.c: Check for message pending instead of message pending count to avoid dead code from inlined chain routine. It checks if the chain is empty so is redundant to count == 0.
Diffstat (limited to 'cpukit/score/src/coremsgseize.c')
-rw-r--r--cpukit/score/src/coremsgseize.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/score/src/coremsgseize.c b/cpukit/score/src/coremsgseize.c
index fc11e3e80d..010f201b78 100644
--- a/cpukit/score/src/coremsgseize.c
+++ b/cpukit/score/src/coremsgseize.c
@@ -76,10 +76,9 @@ void _CORE_message_queue_Seize(
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
- if ( the_message_queue->number_of_pending_messages != 0 ) {
+ the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
+ if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
-
- the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
_ISR_Enable( level );
*size = the_message->Contents.size;