diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-22 13:57:18 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-22 13:58:32 +0200 |
commit | b0686b473d8c07e5bbdc1932d7d9b71bfccdf92e (patch) | |
tree | 0c09c09140e21de14d183bdc4146a02560e92dbc /cpukit/score/src | |
parent | score: Delete bogus THREAD_QUEUE_WAIT_FOREVER (diff) | |
download | rtems-b0686b473d8c07e5bbdc1932d7d9b71bfccdf92e.tar.bz2 |
score: Delete _CORE_RWLock_Timeout()
This function was identical to _Thread_queue_Timeout(). This makes
_Thread_queue_Enqueue_with_handler() obsolete.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/corerwlockobtainread.c | 5 | ||||
-rw-r--r-- | cpukit/score/src/corerwlockobtainwrite.c | 6 | ||||
-rw-r--r-- | cpukit/score/src/corerwlocktimeout.c | 45 | ||||
-rw-r--r-- | cpukit/score/src/threadqenqueue.c | 11 |
4 files changed, 9 insertions, 58 deletions
diff --git a/cpukit/score/src/corerwlockobtainread.c b/cpukit/score/src/corerwlockobtainread.c index c118e2900f..f3851b4fd3 100644 --- a/cpukit/score/src/corerwlockobtainread.c +++ b/cpukit/score/src/corerwlockobtainread.c @@ -84,11 +84,10 @@ void _CORE_RWLock_Obtain_for_reading( executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); - _Thread_queue_Enqueue_with_handler( + _Thread_queue_Enqueue( &the_rwlock->Wait_queue, executing, - timeout, - _CORE_RWLock_Timeout + timeout ); /* return to API level so it can dispatch and we block */ diff --git a/cpukit/score/src/corerwlockobtainwrite.c b/cpukit/score/src/corerwlockobtainwrite.c index 40da6c9f4e..ea7d25c0e3 100644 --- a/cpukit/score/src/corerwlockobtainwrite.c +++ b/cpukit/score/src/corerwlockobtainwrite.c @@ -74,13 +74,11 @@ void _CORE_RWLock_Obtain_for_writing( executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); - _Thread_queue_Enqueue_with_handler( + _Thread_queue_Enqueue( &the_rwlock->Wait_queue, executing, - timeout, - _CORE_RWLock_Timeout + timeout ); - /* return to API level so it can dispatch and we block */ } diff --git a/cpukit/score/src/corerwlocktimeout.c b/cpukit/score/src/corerwlocktimeout.c deleted file mode 100644 index 2e4b03f534..0000000000 --- a/cpukit/score/src/corerwlocktimeout.c +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @file - * - * @brief RWLock Specific Thread Queue Timeout - * @ingroup ScoreRWLock - */ - -/* - * COPYRIGHT (c) 1989-2007. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <rtems/score/corerwlockimpl.h> -#include <rtems/score/threadimpl.h> -#include <rtems/score/threadqimpl.h> - -void _CORE_RWLock_Timeout( - Objects_Id id, - void *ignored -) -{ - Thread_Control *the_thread; - Objects_Locations location; - - the_thread = _Thread_Get( id, &location ); - switch ( location ) { - case OBJECTS_ERROR: -#if defined(RTEMS_MULTIPROCESSING) - case OBJECTS_REMOTE: /* impossible */ -#endif - break; - case OBJECTS_LOCAL: - _Thread_queue_Process_timeout( the_thread ); - _Objects_Put_without_thread_dispatch( &the_thread->Object ); - break; - } -} diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c index c059556408..904855156b 100644 --- a/cpukit/score/src/threadqenqueue.c +++ b/cpukit/score/src/threadqenqueue.c @@ -101,11 +101,10 @@ static void _Thread_queue_Requeue_priority( ); } -void _Thread_queue_Enqueue_with_handler( - Thread_queue_Control *the_thread_queue, - Thread_Control *the_thread, - Watchdog_Interval timeout, - Thread_queue_Timeout_callout handler +void _Thread_queue_Enqueue( + Thread_queue_Control *the_thread_queue, + Thread_Control *the_thread, + Watchdog_Interval timeout ) { ISR_lock_Context lock_context; @@ -127,7 +126,7 @@ void _Thread_queue_Enqueue_with_handler( if ( timeout ) { _Watchdog_Initialize( &the_thread->Timer, - handler, + _Thread_queue_Timeout, the_thread->Object.id, NULL ); |