summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremutexseize.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-10-19 19:20:10 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-10-19 19:20:10 +0000
commit04dba496a650cbd1c4ee04a12d6afa38210bcc02 (patch)
treeceb8b8394815a7285d043569b9733aa49656eb16 /cpukit/score/src/coremutexseize.c
parent2006-10-19 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-04dba496a650cbd1c4ee04a12d6afa38210bcc02.tar.bz2
2006-10-19 Joel Sherrill <joel@OARcorp.com>
* configure.ac, itron/Makefile.am, itron/preinstall.am, posix/Makefile.am, posix/preinstall.am, rtems/Makefile.am, rtems/preinstall.am, sapi/Makefile.am, sapi/preinstall.am, score/Makefile.am, score/preinstall.am, score/include/rtems/system.h, score/include/rtems/score/chain.h, score/include/rtems/score/thread.h, score/src/chain.c, score/src/coremutexseize.c, score/src/threadget.c: Remove all macro implementations and use only the static inline. Static inline functions are now well supported so there is no reason for duplicate maintenance. * itron/macros/rtems/itron/eventflags.inl, itron/macros/rtems/itron/fmempool.inl, itron/macros/rtems/itron/intr.inl, itron/macros/rtems/itron/mbox.inl, itron/macros/rtems/itron/msgbuffer.inl, itron/macros/rtems/itron/network.inl, itron/macros/rtems/itron/port.inl, itron/macros/rtems/itron/semaphore.inl, itron/macros/rtems/itron/sysmgmt.inl, itron/macros/rtems/itron/task.inl, itron/macros/rtems/itron/time.inl, itron/macros/rtems/itron/vmempool.inl, posix/macros/rtems/posix/cond.inl, posix/macros/rtems/posix/key.inl, posix/macros/rtems/posix/mqueue.inl, posix/macros/rtems/posix/mutex.inl, posix/macros/rtems/posix/priority.inl, posix/macros/rtems/posix/pthread.inl, posix/macros/rtems/posix/semaphore.inl, posix/macros/rtems/posix/timer.inl, rtems/macros/rtems/rtems/asr.inl, rtems/macros/rtems/rtems/attr.inl, rtems/macros/rtems/rtems/barrier.inl, rtems/macros/rtems/rtems/dpmem.inl, rtems/macros/rtems/rtems/event.inl, rtems/macros/rtems/rtems/eventset.inl, rtems/macros/rtems/rtems/message.inl, rtems/macros/rtems/rtems/modes.inl, rtems/macros/rtems/rtems/options.inl, rtems/macros/rtems/rtems/part.inl, rtems/macros/rtems/rtems/ratemon.inl, rtems/macros/rtems/rtems/region.inl, rtems/macros/rtems/rtems/sem.inl, rtems/macros/rtems/rtems/status.inl, rtems/macros/rtems/rtems/support.inl, rtems/macros/rtems/rtems/tasks.inl, rtems/macros/rtems/rtems/timer.inl, sapi/macros/rtems/extension.inl, score/macros/README, score/macros/rtems/score/address.inl, score/macros/rtems/score/chain.inl, score/macros/rtems/score/corebarrier.inl, score/macros/rtems/score/coremsg.inl, score/macros/rtems/score/coremutex.inl, score/macros/rtems/score/corerwlock.inl, score/macros/rtems/score/coresem.inl, score/macros/rtems/score/corespinlock.inl, score/macros/rtems/score/heap.inl, score/macros/rtems/score/isr.inl, score/macros/rtems/score/mppkt.inl, score/macros/rtems/score/object.inl, score/macros/rtems/score/objectmp.inl, score/macros/rtems/score/priority.inl, score/macros/rtems/score/stack.inl, score/macros/rtems/score/states.inl, score/macros/rtems/score/sysstate.inl, score/macros/rtems/score/thread.inl, score/macros/rtems/score/threadmp.inl, score/macros/rtems/score/tod.inl, score/macros/rtems/score/tqdata.inl, score/macros/rtems/score/userext.inl, score/macros/rtems/score/watchdog.inl, score/macros/rtems/score/wkspace.inl: Removed.
Diffstat (limited to 'cpukit/score/src/coremutexseize.c')
-rw-r--r--cpukit/score/src/coremutexseize.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/cpukit/score/src/coremutexseize.c b/cpukit/score/src/coremutexseize.c
index 6b04d200ac..2fdc4d6fc4 100644
--- a/cpukit/score/src/coremutexseize.c
+++ b/cpukit/score/src/coremutexseize.c
@@ -63,80 +63,3 @@ void _CORE_mutex_Seize_interrupt_blocking(
_Thread_Enable_dispatch();
}
-#if !defined(RTEMS_INLINES)
-int _CORE_mutex_Seize_interrupt_trylock(
- CORE_mutex_Control *the_mutex,
- ISR_Level *level_p
-)
-{
- Thread_Control *executing;
- ISR_Level level = *level_p;
-
- /* disabled when you get here */
-
- executing = _Thread_Executing;
- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
- if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
- the_mutex->lock = CORE_MUTEX_LOCKED;
- the_mutex->holder = executing;
- the_mutex->holder_id = executing->Object.id;
- the_mutex->nest_count = 1;
- if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
- _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) )
- executing->resource_count++;
-
- if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
- _ISR_Enable( level );
- return 0;
- }
- /* else must be CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING */
- {
- Priority_Control ceiling;
- Priority_Control current;
-
- ceiling = the_mutex->Attributes.priority_ceiling;
- current = executing->current_priority;
- if ( current == ceiling ) {
- _ISR_Enable( level );
- return 0;
- }
- if ( current > ceiling ) {
- _Thread_Disable_dispatch();
- _ISR_Enable( level );
- _Thread_Change_priority(
- the_mutex->holder,
- the_mutex->Attributes.priority_ceiling,
- FALSE
- );
- _Thread_Enable_dispatch();
- return 0;
- }
- /* if ( current < ceiling ) */ {
- executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
- the_mutex->nest_count = 0; /* undo locking above */
- executing->resource_count--; /* undo locking above */
- _ISR_Enable( level );
- return 0;
- }
- }
- return 0;
- }
-
- if ( _Thread_Is_executing( the_mutex->holder ) ) {
- switch ( the_mutex->Attributes.lock_nesting_behavior ) {
- case CORE_MUTEX_NESTING_ACQUIRES:
- the_mutex->nest_count++;
- _ISR_Enable( level );
- return 0;
- case CORE_MUTEX_NESTING_IS_ERROR:
- executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
- _ISR_Enable( level );
- return 0;
- case CORE_MUTEX_NESTING_BLOCKS:
- break;
- }
- }
-
- return 1;
-}
-#endif