diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-23 06:55:49 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-25 12:43:53 +0200 |
commit | c3d8d9e0bf8b86d7ca8a51adbf1bbeaaf69f82cf (patch) | |
tree | 9ae8ffddbc32ea50a3c635adf0f4954d9d43e5ca /cpukit/score/src | |
parent | score: Move thread queue object support (diff) | |
download | rtems-c3d8d9e0bf8b86d7ca8a51adbf1bbeaaf69f82cf.tar.bz2 |
score: Get rid of mp_id parameter
Get rid of the mp_id parameter used for some thread queue methods. Use
THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/apimutexunlock.c | 1 | ||||
-rw-r--r-- | cpukit/score/src/condition.c | 1 | ||||
-rw-r--r-- | cpukit/score/src/corebarrierrelease.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/corebarrierwait.c | 3 | ||||
-rw-r--r-- | cpukit/score/src/coremsgbroadcast.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/coremsgclose.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/coremsgseize.c | 1 | ||||
-rw-r--r-- | cpukit/score/src/coremsgsubmit.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/coremutexsurrender.c | 4 | ||||
-rw-r--r-- | cpukit/score/src/corerwlockrelease.c | 1 | ||||
-rw-r--r-- | cpukit/score/src/futex.c | 1 | ||||
-rw-r--r-- | cpukit/score/src/mpci.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/mutex.c | 3 | ||||
-rw-r--r-- | cpukit/score/src/semaphore.c | 1 | ||||
-rw-r--r-- | cpukit/score/src/threadqenqueue.c | 24 | ||||
-rw-r--r-- | cpukit/score/src/threadqflush.c | 4 | ||||
-rw-r--r-- | cpukit/score/src/threadrestart.c | 1 |
17 files changed, 14 insertions, 41 deletions
diff --git a/cpukit/score/src/apimutexunlock.c b/cpukit/score/src/apimutexunlock.c index e129dd2091..082961f4fe 100644 --- a/cpukit/score/src/apimutexunlock.c +++ b/cpukit/score/src/apimutexunlock.c @@ -35,7 +35,6 @@ void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) _CORE_mutex_Surrender( &the_mutex->Mutex, NULL, - 0, &lock_context ); diff --git a/cpukit/score/src/condition.c b/cpukit/score/src/condition.c index ba255fc5d2..fcd93b201b 100644 --- a/cpukit/score/src/condition.c +++ b/cpukit/score/src/condition.c @@ -267,7 +267,6 @@ static void _Condition_Wake( struct _Condition_Control *_condition, int count ) CONDITION_TQ_OPERATIONS, _Condition_Flush_filter, NULL, - 0, &lock_context.Base ); } diff --git a/cpukit/score/src/corebarrierrelease.c b/cpukit/score/src/corebarrierrelease.c index e6ef335abc..c9c80f47dd 100644 --- a/cpukit/score/src/corebarrierrelease.c +++ b/cpukit/score/src/corebarrierrelease.c @@ -26,7 +26,6 @@ uint32_t _CORE_barrier_Do_surrender( Thread_queue_Flush_filter filter, #if defined(RTEMS_MULTIPROCESSING) Thread_queue_MP_callout mp_callout, - Objects_Id mp_id, #endif ISR_lock_Context *lock_context ) @@ -37,7 +36,6 @@ uint32_t _CORE_barrier_Do_surrender( CORE_BARRIER_TQ_OPERATIONS, filter, mp_callout, - mp_id, lock_context ); } diff --git a/cpukit/score/src/corebarrierwait.c b/cpukit/score/src/corebarrierwait.c index 4a924b28dd..54e90965f0 100644 --- a/cpukit/score/src/corebarrierwait.c +++ b/cpukit/score/src/corebarrierwait.c @@ -28,7 +28,6 @@ void _CORE_barrier_Do_seize( Watchdog_Interval timeout, #if defined(RTEMS_MULTIPROCESSING) Thread_queue_MP_callout mp_callout, - Objects_Id mp_id, #endif ISR_lock_Context *lock_context ) @@ -47,7 +46,7 @@ void _CORE_barrier_Do_seize( && number_of_waiting_threads == the_barrier->Attributes.maximum_count ) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; - _CORE_barrier_Surrender( the_barrier, mp_callout, mp_id, lock_context ); + _CORE_barrier_Surrender( the_barrier, mp_callout, lock_context ); } else { the_barrier->number_of_waiting_threads = number_of_waiting_threads; _Thread_queue_Enqueue_critical( diff --git a/cpukit/score/src/coremsgbroadcast.c b/cpukit/score/src/coremsgbroadcast.c index 9a863ffb2f..a7a962f16f 100644 --- a/cpukit/score/src/coremsgbroadcast.c +++ b/cpukit/score/src/coremsgbroadcast.c @@ -27,7 +27,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast( size_t size, #if defined(RTEMS_MULTIPROCESSING) Thread_queue_MP_callout mp_callout, - Objects_Id mp_id, #endif uint32_t *count, ISR_lock_Context *lock_context @@ -52,7 +51,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast( buffer, size, mp_callout, - mp_id, 0, lock_context ) diff --git a/cpukit/score/src/coremsgclose.c b/cpukit/score/src/coremsgclose.c index 5b534312e7..1951e9ffd1 100644 --- a/cpukit/score/src/coremsgclose.c +++ b/cpukit/score/src/coremsgclose.c @@ -36,7 +36,6 @@ void _CORE_message_queue_Do_close( CORE_message_queue_Control *the_message_queue, #if defined(RTEMS_MULTIPROCESSING) Thread_queue_MP_callout mp_callout, - Objects_Id mp_id, #endif ISR_lock_Context *lock_context ) @@ -52,7 +51,6 @@ void _CORE_message_queue_Do_close( the_message_queue->operations, _CORE_message_queue_Was_deleted, mp_callout, - mp_id, lock_context ); diff --git a/cpukit/score/src/coremsgseize.c b/cpukit/score/src/coremsgseize.c index c9a2473e95..fcc95a7d28 100644 --- a/cpukit/score/src/coremsgseize.c +++ b/cpukit/score/src/coremsgseize.c @@ -101,7 +101,6 @@ void _CORE_message_queue_Seize( the_message_queue->operations, the_thread, NULL, - 0, lock_context ); return; diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c index 91fb332e76..68067cccb6 100644 --- a/cpukit/score/src/coremsgsubmit.c +++ b/cpukit/score/src/coremsgsubmit.c @@ -32,7 +32,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit( size_t size, #if defined(RTEMS_MULTIPROCESSING) Thread_queue_MP_callout mp_callout, - Objects_Id mp_id, #endif CORE_message_queue_Submit_types submit_type, bool wait, @@ -57,7 +56,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit( buffer, size, mp_callout, - mp_id, submit_type, lock_context ); diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c index 6fcbc434f7..746fee118e 100644 --- a/cpukit/score/src/coremutexsurrender.c +++ b/cpukit/score/src/coremutexsurrender.c @@ -27,7 +27,6 @@ CORE_mutex_Status _CORE_mutex_Do_surrender( CORE_mutex_Control *the_mutex, #if defined(RTEMS_MULTIPROCESSING) Thread_queue_MP_callout mp_callout, - Objects_Id mp_id, #endif ISR_lock_Context *lock_context ) @@ -127,8 +126,7 @@ CORE_mutex_Status _CORE_mutex_Do_surrender( &the_mutex->Wait_queue.Queue, the_mutex->operations, the_thread, - mp_callout, - mp_id + mp_callout ); #if defined(RTEMS_MULTIPROCESSING) diff --git a/cpukit/score/src/corerwlockrelease.c b/cpukit/score/src/corerwlockrelease.c index 3ace00da8e..6f76aad3e5 100644 --- a/cpukit/score/src/corerwlockrelease.c +++ b/cpukit/score/src/corerwlockrelease.c @@ -120,7 +120,6 @@ CORE_RWLock_Status _CORE_RWLock_Surrender( CORE_RWLOCK_TQ_OPERATIONS, _CORE_RWLock_Flush_filter, NULL, - 0, lock_context ); return CORE_RWLOCK_SUCCESSFUL; diff --git a/cpukit/score/src/futex.c b/cpukit/score/src/futex.c index 59a625cb29..66085a8a0a 100644 --- a/cpukit/score/src/futex.c +++ b/cpukit/score/src/futex.c @@ -151,7 +151,6 @@ int _Futex_Wake( struct _Futex_Control *_futex, int count ) FUTEX_TQ_OPERATIONS, _Futex_Flush_filter, NULL, - 0, &lock_context.Base ); } diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c index d5ba1e5b4e..0b51e382e3 100644 --- a/cpukit/score/src/mpci.c +++ b/cpukit/score/src/mpci.c @@ -373,7 +373,7 @@ void _MPCI_Announce ( void ) ISR_lock_Context lock_context; _ISR_lock_ISR_disable( &lock_context ); - (void) _CORE_semaphore_Surrender( &_MPCI_Semaphore, 0, 0, &lock_context ); + (void) _CORE_semaphore_Surrender( &_MPCI_Semaphore, 0, &lock_context ); } void _MPCI_Internal_packets_Send_process_packet ( diff --git a/cpukit/score/src/mutex.c b/cpukit/score/src/mutex.c index b28964de2e..e27075ed8b 100644 --- a/cpukit/score/src/mutex.c +++ b/cpukit/score/src/mutex.c @@ -146,8 +146,7 @@ static void _Mutex_Release_slow( &mutex->Queue.Queue, operations, first, - NULL, - 0 + NULL ); _Thread_queue_Boost_priority( &mutex->Queue.Queue, first ); _Thread_queue_Unblock_critical( diff --git a/cpukit/score/src/semaphore.c b/cpukit/score/src/semaphore.c index ae1b5c72e8..4e70b79a6a 100644 --- a/cpukit/score/src/semaphore.c +++ b/cpukit/score/src/semaphore.c @@ -134,7 +134,6 @@ void _Semaphore_Post( struct _Semaphore_Control *_sem ) operations, first, NULL, - 0, &lock_context ); } diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c index 84de11e18d..cda7c86efb 100644 --- a/cpukit/score/src/threadqenqueue.c +++ b/cpukit/score/src/threadqenqueue.c @@ -99,8 +99,7 @@ bool _Thread_queue_Do_extract_locked( Thread_Control *the_thread #if defined(RTEMS_MULTIPROCESSING) , - Thread_queue_MP_callout mp_callout, - Objects_Id mp_id + Thread_queue_MP_callout mp_callout #endif ) { @@ -115,7 +114,6 @@ bool _Thread_queue_Do_extract_locked( the_proxy = (Thread_Proxy_control *) the_thread; the_proxy->thread_queue_callout = mp_callout; - the_proxy->thread_queue_id = mp_id; } #endif @@ -172,7 +170,6 @@ void _Thread_queue_Do_extract_critical( Thread_Control *the_thread, #if defined(RTEMS_MULTIPROCESSING) Thread_queue_MP_callout mp_callout, - Objects_Id mp_id, #endif ISR_lock_Context *lock_context ) @@ -183,8 +180,7 @@ void _Thread_queue_Do_extract_critical( queue, operations, the_thread, - mp_callout, - mp_id + mp_callout ); _Thread_queue_Unblock_critical( @@ -213,7 +209,6 @@ void _Thread_queue_Extract( Thread_Control *the_thread ) the_thread->Wait.operations, the_thread, _Thread_queue_MP_callout_do_nothing, - 0, &lock_context ); } else { @@ -226,8 +221,7 @@ Thread_Control *_Thread_queue_Do_dequeue( const Thread_queue_Operations *operations #if defined(RTEMS_MULTIPROCESSING) , - Thread_queue_MP_callout mp_callout, - Objects_Id mp_id + Thread_queue_MP_callout mp_callout #endif ) { @@ -246,7 +240,6 @@ Thread_Control *_Thread_queue_Do_dequeue( operations, the_thread, mp_callout, - mp_id, &lock_context ); } else { @@ -262,13 +255,14 @@ void _Thread_queue_Unblock_proxy( Thread_Control *the_thread ) { - Thread_Proxy_control *the_proxy; + const Thread_queue_Object *the_queue_object; + Thread_Proxy_control *the_proxy; + Thread_queue_MP_callout mp_callout; + the_queue_object = THREAD_QUEUE_QUEUE_TO_OBJECT( queue ); the_proxy = (Thread_Proxy_control *) the_thread; - ( *the_proxy->thread_queue_callout )( - the_thread, - the_proxy->thread_queue_id - ); + mp_callout = the_proxy->thread_queue_callout; + ( *mp_callout )( the_thread, the_queue_object->Object.id ); _Thread_MP_Free_proxy( the_thread ); } diff --git a/cpukit/score/src/threadqflush.c b/cpukit/score/src/threadqflush.c index a67f354273..0413388f5d 100644 --- a/cpukit/score/src/threadqflush.c +++ b/cpukit/score/src/threadqflush.c @@ -37,7 +37,6 @@ size_t _Thread_queue_Do_flush_critical( Thread_queue_Flush_filter filter, #if defined(RTEMS_MULTIPROCESSING) Thread_queue_MP_callout mp_callout, - Objects_Id mp_id, #endif ISR_lock_Context *lock_context ) @@ -70,8 +69,7 @@ size_t _Thread_queue_Do_flush_critical( queue, operations, first, - mp_callout, - mp_id + mp_callout ); if ( do_unblock ) { _Chain_Append_unprotected( &unblock, &first->Wait.Node.Chain ); diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c index 33c56e023c..30536f748a 100644 --- a/cpukit/score/src/threadrestart.c +++ b/cpukit/score/src/threadrestart.c @@ -128,7 +128,6 @@ static void _Thread_Wake_up_joining_threads( Thread_Control *the_thread ) _Thread_queue_Flush_default_filter, #endif NULL, - 0, &join_lock_context.Base ); } |