summaryrefslogtreecommitdiffstats
path: root/cpukit/score
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
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')
-rw-r--r--cpukit/score/inline/rtems/score/isr.inl2
-rw-r--r--cpukit/score/src/apimutexallocate.c18
-rw-r--r--cpukit/score/src/coremsgseize.c5
3 files changed, 11 insertions, 14 deletions
diff --git a/cpukit/score/inline/rtems/score/isr.inl b/cpukit/score/inline/rtems/score/isr.inl
index 74c0588619..4aff1b09e6 100644
--- a/cpukit/score/inline/rtems/score/isr.inl
+++ b/cpukit/score/inline/rtems/score/isr.inl
@@ -45,7 +45,7 @@ RTEMS_INLINE_ROUTINE boolean _ISR_Is_valid_user_handler (
void *handler
)
{
- return ( handler != NULL);
+ return (handler != NULL);
}
/**@}*/
diff --git a/cpukit/score/src/apimutexallocate.c b/cpukit/score/src/apimutexallocate.c
index b346af42f2..627a33dae4 100644
--- a/cpukit/score/src/apimutexallocate.c
+++ b/cpukit/score/src/apimutexallocate.c
@@ -22,19 +22,17 @@ void _API_Mutex_Allocate(
{
API_Mutex_Control *mutex;
CORE_mutex_Attributes attr = {
- CORE_MUTEX_NESTING_IS_ERROR,
- FALSE,
- CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT,
- 0
- };
+ CORE_MUTEX_NESTING_IS_ERROR,
+ FALSE,
+ CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT,
+ 0
+ };
mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information );
- _CORE_mutex_Initialize(
- &mutex->Mutex,
- &attr,
- CORE_MUTEX_UNLOCKED
- );
+ _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED );
+
+ _Objects_Open( &_API_Mutex_Information, &mutex->Object, (Objects_Name) 1 );
*the_mutex = mutex;
}
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;