From 1ff9922df0f6e5f129299847d0f5eccbc8d6806c Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sat, 22 Dec 2007 08:27:18 +0000 Subject: 2007-12-22 Chris Johns * configure.ac: fixed bug that always enabled strict order mutexes. * score/inline/rtems/score/coremutex.inl: Fixed coding standard. * score/src/coremutex.c: Add the holder's thread to the lock_mutex list if the mutex is initialised locked. * libnetworking/rtems/rtems_glue.c: Changed semaphore error message to show the error is an rtems-net error. * libmisc/monitor/mon-network.c: Removed warnings. * telnetd/icmds.c: Changed shell_* to rtems_shell_*. * score/Makefile.am: Fixed typo that stopped 'make tags' working. * libmisc/shell/err.c, libmisc/shell/err.h, libmisc/shell/errx.c, libmisc/shell/extern-cp.h, libmisc/shell/fts.c, libmisc/shell/fts.h, libmisc/shell/main_cp.c, libmisc/shell/utils-cp.c, libmisc/shell/verr.c, libmisc/shell/verrx.c, libmisc/shell/vwarn.c, libmisc/shell/vwarnx.c, libmisc/shell/warn.c, libmisc/shell/warnx.c: New. Ported from BSD. * libmisc/shell/shellconfig.h: Add the cp command. * libmisc/Makefile.am: Add the new files to the shell. * libmisc/shell/shell.c, libmisc/shell/shell.h: Add scripting support. * libblock/src/flashdisk.c: Fixed disk drive count size setting bug. --- cpukit/score/Makefile.am | 2 +- cpukit/score/inline/rtems/score/coremutex.inl | 3 ++- cpukit/score/src/coremutex.c | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'cpukit/score') diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am index 0152e138b3..9e412863f7 100644 --- a/cpukit/score/Makefile.am +++ b/cpukit/score/Makefile.am @@ -113,7 +113,7 @@ libscore_a_SOURCES += src/heap.c src/heapallocate.c src/heapextend.c \ libscore_a_SOURCES += src/object.c src/objectallocate.c \ src/objectclearname.c src/objectcomparenameraw.c \ src/objectcomparenamestring.c src/objectcopynameraw.c \ - src/objectcopynamestring.c \ src/objectextendinformation.c \ + src/objectcopynamestring.c src/objectextendinformation.c \ src/objectfree.c src/objectget.c src/objectgetisr.c src/objectgetnext.c \ src/objectinitializeinformation.c src/objectnametoid.c \ src/objectshrinkinformation.c src/objectgetnoprotection.c \ diff --git a/cpukit/score/inline/rtems/score/coremutex.inl b/cpukit/score/inline/rtems/score/coremutex.inl index 9311cd11a5..8d417568e9 100644 --- a/cpukit/score/inline/rtems/score/coremutex.inl +++ b/cpukit/score/inline/rtems/score/coremutex.inl @@ -141,7 +141,8 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body( _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ){ #ifdef __STRICT_ORDER_MUTEX__ - _Chain_Prepend_unprotected(&executing->lock_mutex,&the_mutex->queue.lock_queue); + _Chain_Prepend_unprotected( &executing->lock_mutex, + &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c index 173418ffc0..f6e6c80177 100644 --- a/cpukit/score/src/coremutex.c +++ b/cpukit/score/src/coremutex.c @@ -64,6 +64,13 @@ void _CORE_mutex_Initialize( 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 ) ) + +#ifdef __STRICT_ORDER_MUTEX__ + _Chain_Prepend_unprotected( &executing->lock_mutex, + &the_mutex->queue.lock_queue ); + the_mutex->queue.priority_before = executing->current_priority; +#endif + _Thread_Executing->resource_count++; } else { the_mutex->nest_count = 0; -- cgit v1.2.3