summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/coresemimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-30 11:39:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-06 09:08:20 +0200
commit9809d6e08264525ea58839b98e6d90121b841196 (patch)
tree7ccbdd61436c18d1e1bae9033a3907afb5bff629 /cpukit/score/include/rtems/score/coresemimpl.h
parentscore: Fix _Thread_queue_Extract_locked() (diff)
downloadrtems-9809d6e08264525ea58839b98e6d90121b841196.tar.bz2
score: _Thread_queue_Flush() parameter changes
Change _Thread_queue_Flush() into a macro that invokes _Thread_queue_Do_flush() with the parameter set defined by RTEMS_MULTIPROCESSING. For multiprocessing configurations add the object identifier to avoid direct use of the thread wait information. Use mp_ prefix for multiprocessing related parameters. Rename Thread_queue_Flush_callout to Thread_queue_MP_callout since this type will be re-used later for other operations as well.
Diffstat (limited to 'cpukit/score/include/rtems/score/coresemimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/coresemimpl.h42
1 files changed, 14 insertions, 28 deletions
diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h
index 46033a8499..bde3e5b493 100644
--- a/cpukit/score/include/rtems/score/coresemimpl.h
+++ b/cpukit/score/include/rtems/score/coresemimpl.h
@@ -167,34 +167,20 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Surrender(
return status;
}
-/**
- * @brief Core semaphore flush.
- *
- * This package is the implementation of the CORE Semaphore Handler.
- * This core object utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * This routine assists in the deletion of a semaphore by flushing the
- * associated wait queue.
- *
- * @param[in] the_semaphore is the semaphore to flush
- * @param[in] remote_extract_callout is the routine to invoke if the
- * thread unblocked is remote
- * @param[in] status is the status to be returned to the unblocked thread
- */
-RTEMS_INLINE_ROUTINE void _CORE_semaphore_Flush(
- CORE_semaphore_Control *the_semaphore,
- Thread_queue_Flush_callout remote_extract_callout,
- uint32_t status
-)
-{
- _Thread_queue_Flush(
- &the_semaphore->Wait_queue,
- the_semaphore->operations,
- remote_extract_callout,
- status
- );
-}
+/* Must be a macro due to the multiprocessing dependent parameters */
+#define _CORE_semaphore_Flush( \
+ the_semaphore, \
+ status, \
+ mp_callout, \
+ mp_id \
+) \
+ _Thread_queue_Flush( \
+ &( the_semaphore )->Wait_queue, \
+ ( the_semaphore )->operations, \
+ status, \
+ mp_callout, \
+ mp_id \
+ )
/**
* This routine returns the current count associated with the semaphore.