#1412 closed defect (fixed)

Missing brackets in coremutex.c

Reported by: Manuel Coutinho Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: score Version: 4.9
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

Description:
In the function _CORE_mutex_Initialize there are some missing brackets (possibly forgot to place them when adding the #ifdef RTEMS_STRICT_ORDER_MUTEX block).

Proposed solution:

Index: cpukit/score/src/coremutex.c
===================================================================
RCS file: /usr1/CVS/rtems/cpukit/score/src/coremutex.c,v
retrieving revision 1.31
diff -u -r1.31 coremutex.c
--- cpukit/score/src/coremutex.c 29 Jul 2008 02:21:15 -0000 1.31
+++ cpukit/score/src/coremutex.c 15 May 2009 17:28:30 -0000
@@ -63,7 +63,7 @@

the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;

if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes )
  • _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) )

+ _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {

#ifdef RTEMS_STRICT_ORDER_MUTEX

_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, @@ -72,6 +72,7 @@ #endif


_Thread_Executing->resource_count++;

+ }

} else {

the_mutex->nest_count = 0;
the_mutex->holder = NULL;

============================================

Attachments (1)

pr1412.diff (947 bytes) - added by Joel Sherrill on May 18, 2009 at 1:37:11 PM.
Adds missing braces

Download all attachments as: .zip

Change History (2)

Changed on May 18, 2009 at 1:37:11 PM by Joel Sherrill

Attachment: pr1412.diff added

Adds missing braces

comment:1 Changed on May 18, 2009 at 1:49:08 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Patch applied to both 4.9 and cvs head.

Note: See TracTickets for help on using tickets.