summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/threadqimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/score/threadqimpl.h')
-rw-r--r--cpukit/include/rtems/score/threadqimpl.h95
1 files changed, 57 insertions, 38 deletions
diff --git a/cpukit/include/rtems/score/threadqimpl.h b/cpukit/include/rtems/score/threadqimpl.h
index 7dd7250acf..44b2010226 100644
--- a/cpukit/include/rtems/score/threadqimpl.h
+++ b/cpukit/include/rtems/score/threadqimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2014.
* 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.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _RTEMS_SCORE_THREADQIMPL_H
@@ -147,7 +166,7 @@ void _Thread_queue_Deadlock_fatal( Thread_Control *the_thread );
*
* @param[out] queue_context The thread queue context to initialize.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Context_initialize(
+static inline void _Thread_queue_Context_initialize(
Thread_queue_Context *queue_context
)
{
@@ -172,7 +191,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_initialize(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void
+static inline void
_Thread_queue_Context_set_thread_state(
Thread_queue_Context *queue_context,
States_Control thread_state
@@ -189,7 +208,7 @@ _Thread_queue_Context_set_thread_state(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void
+static inline void
_Thread_queue_Context_set_timeout_ticks(
Thread_queue_Context *queue_context,
Watchdog_Interval ticks
@@ -210,7 +229,7 @@ _Thread_queue_Context_set_timeout_ticks(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void
+static inline void
_Thread_queue_Context_set_timeout_argument(
Thread_queue_Context *queue_context,
const void *arg,
@@ -229,7 +248,7 @@ _Thread_queue_Context_set_timeout_argument(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void
+static inline void
_Thread_queue_Context_set_enqueue_callout(
Thread_queue_Context *queue_context,
Thread_queue_Enqueue_callout enqueue_callout
@@ -245,7 +264,7 @@ _Thread_queue_Context_set_enqueue_callout(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void
+static inline void
_Thread_queue_Context_set_enqueue_do_nothing_extra(
Thread_queue_Context *queue_context
)
@@ -262,7 +281,7 @@ _Thread_queue_Context_set_enqueue_do_nothing_extra(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void
+static inline void
_Thread_queue_Context_set_enqueue_timeout_ticks(
Thread_queue_Context *queue_context,
Watchdog_Interval ticks
@@ -285,7 +304,7 @@ _Thread_queue_Context_set_enqueue_timeout_ticks(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void
+static inline void
_Thread_queue_Context_set_enqueue_timeout_monotonic_timespec(
Thread_queue_Context *queue_context,
const struct timespec *timeout,
@@ -311,7 +330,7 @@ _Thread_queue_Context_set_enqueue_timeout_monotonic_timespec(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void
+static inline void
_Thread_queue_Context_set_enqueue_timeout_realtime_timespec(
Thread_queue_Context *queue_context,
const struct timespec *timeout,
@@ -337,7 +356,7 @@ _Thread_queue_Context_set_enqueue_timeout_realtime_timespec(
*
* @see _Thread_queue_Enqueue().
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_deadlock_callout(
+static inline void _Thread_queue_Context_set_deadlock_callout(
Thread_queue_Context *queue_context,
Thread_queue_Deadlock_callout deadlock_callout
)
@@ -351,7 +370,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_deadlock_callout(
* @param[out] queue_context The thread queue context to clear the priority
* update count.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Context_clear_priority_updates(
+static inline void _Thread_queue_Context_clear_priority_updates(
Thread_queue_Context *queue_context
)
{
@@ -366,7 +385,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_clear_priority_updates(
*
* @return The priority update count of @a queue_context.
*/
-RTEMS_INLINE_ROUTINE size_t _Thread_queue_Context_get_priority_updates(
+static inline size_t _Thread_queue_Context_get_priority_updates(
const Thread_queue_Context *queue_context
)
{
@@ -380,7 +399,7 @@ RTEMS_INLINE_ROUTINE size_t _Thread_queue_Context_get_priority_updates(
* update count of.
* @param update_count The priority update count.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Context_restore_priority_updates(
+static inline void _Thread_queue_Context_restore_priority_updates(
Thread_queue_Context *queue_context,
size_t update_count
)
@@ -396,7 +415,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_restore_priority_updates(
* array.
* @param the_thread The thread for the priority update.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Context_add_priority_update(
+static inline void _Thread_queue_Context_add_priority_update(
Thread_queue_Context *queue_context,
Thread_Control *the_thread
)
@@ -424,7 +443,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_add_priority_update(
* @param[out] queue_context The thread queue context to set the ISR level of.
* @param level The ISR level to set @a queue_context to.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_ISR_level(
+static inline void _Thread_queue_Context_set_ISR_level(
Thread_queue_Context *queue_context,
ISR_Level level
)
@@ -442,7 +461,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_ISR_level(
*
* @return The current processor.
*/
-RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_queue_Dispatch_disable(
+static inline Per_CPU_Control *_Thread_queue_Dispatch_disable(
Thread_queue_Context *queue_context
)
{
@@ -461,7 +480,7 @@ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_queue_Dispatch_disable(
* objects with multiprocessing (MP) support.
*/
#if defined(RTEMS_MULTIPROCESSING)
-RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_MP_callout(
+static inline void _Thread_queue_Context_set_MP_callout(
Thread_queue_Context *queue_context,
Thread_queue_MP_callout mp_callout
)
@@ -481,7 +500,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_MP_callout(
*
* @param[out] gate The gate to close.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Gate_close(
+static inline void _Thread_queue_Gate_close(
Thread_queue_Gate *gate
)
{
@@ -494,7 +513,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Gate_close(
* @param[in, out] chain The chain to add the gate to.
* @param gate The gate to add to the chain.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Gate_add(
+static inline void _Thread_queue_Gate_add(
Chain_Control *chain,
Thread_queue_Gate *gate
)
@@ -507,7 +526,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Gate_add(
*
* @param[out] gate The gate to open.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Gate_open(
+static inline void _Thread_queue_Gate_open(
Thread_queue_Gate *gate
)
{
@@ -521,7 +540,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Gate_open(
*
* @param gate The gate to wait for.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Gate_wait(
+static inline void _Thread_queue_Gate_wait(
Thread_queue_Gate *gate
)
{
@@ -536,7 +555,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Gate_wait(
*
* @param[out] heads The thread queue heads to initialize.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Heads_initialize(
+static inline void _Thread_queue_Heads_initialize(
Thread_queue_Heads *heads
)
{
@@ -560,7 +579,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Heads_initialize(
* @param[out] queue The thread queue queue to initialize.
* @param name The name for the @a queue.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_initialize(
+static inline void _Thread_queue_Queue_initialize(
Thread_queue_Queue *queue,
const char *name
)
@@ -580,7 +599,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_initialize(
* @param lock_stats The lock statistics.
* @param[out] lock_context The interrupt lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_do_acquire_critical(
+static inline void _Thread_queue_Queue_do_acquire_critical(
Thread_queue_Queue *queue,
#if defined(RTEMS_SMP) && defined(RTEMS_PROFILING)
SMP_lock_Stats *lock_stats,
@@ -616,7 +635,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_do_acquire_critical(
* @param queue The thread queue queue to release in a critical section.
* @param[out] lock_context The interrupt lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_release_critical(
+static inline void _Thread_queue_Queue_release_critical(
Thread_queue_Queue *queue,
ISR_lock_Context *lock_context
)
@@ -638,7 +657,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_release_critical(
* @param queue The thread queue queue to release.
* @param[out] lock_context The interrupt lock context to enable interrupts.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_release(
+static inline void _Thread_queue_Queue_release(
Thread_queue_Queue *queue,
ISR_lock_Context *lock_context
)
@@ -678,7 +697,7 @@ void _Thread_queue_Do_acquire_critical(
ISR_lock_Context *lock_context
);
#else
-RTEMS_INLINE_ROUTINE void _Thread_queue_Do_acquire_critical(
+static inline void _Thread_queue_Do_acquire_critical(
Thread_queue_Control *the_thread_queue,
ISR_lock_Context *lock_context
)
@@ -694,7 +713,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Do_acquire_critical(
* @param the_thread_queue The thread queue control to acquire.
* @param[out] lock_context The interrupt lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Acquire_critical(
+static inline void _Thread_queue_Acquire_critical(
Thread_queue_Control *the_thread_queue,
Thread_queue_Context *queue_context
)
@@ -717,7 +736,7 @@ void _Thread_queue_Acquire(
Thread_queue_Context *queue_context
);
#else
-RTEMS_INLINE_ROUTINE void _Thread_queue_Acquire(
+static inline void _Thread_queue_Acquire(
Thread_queue_Control *the_thread_queue,
Thread_queue_Context *queue_context
)
@@ -736,7 +755,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Acquire(
* @retval false The thread queue control is not the owner of the lock.
*/
#if defined(RTEMS_DEBUG)
-RTEMS_INLINE_ROUTINE bool _Thread_queue_Is_lock_owner(
+static inline bool _Thread_queue_Is_lock_owner(
const Thread_queue_Control *the_thread_queue
)
{
@@ -760,7 +779,7 @@ void _Thread_queue_Do_release_critical(
ISR_lock_Context *lock_context
);
#else
-RTEMS_INLINE_ROUTINE void _Thread_queue_Do_release_critical(
+static inline void _Thread_queue_Do_release_critical(
Thread_queue_Control *the_thread_queue,
ISR_lock_Context *lock_context
)
@@ -777,7 +796,7 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Do_release_critical(
* @param the_thread_queue The thread queue control to release.
* @param[out] queue_context The thread queue context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Release_critical(
+static inline void _Thread_queue_Release_critical(
Thread_queue_Control *the_thread_queue,
Thread_queue_Context *queue_context
)
@@ -800,7 +819,7 @@ void _Thread_queue_Release(
Thread_queue_Context *queue_context
);
#else
-RTEMS_INLINE_ROUTINE void _Thread_queue_Release(
+static inline void _Thread_queue_Release(
Thread_queue_Control *the_thread_queue,
Thread_queue_Context *queue_context
)
@@ -1088,7 +1107,7 @@ void _Thread_queue_Surrender_sticky(
* @retval true @a queue is empty.
* @retval false @a queue is not empty.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_queue_Is_empty(
+static inline bool _Thread_queue_Is_empty(
const Thread_queue_Queue *queue
)
{
@@ -1286,7 +1305,7 @@ void _Thread_queue_Initialize(
*
* @param[out] the_thread_queue The thread queue to destroy.
*/
-RTEMS_INLINE_ROUTINE void _Thread_queue_Destroy(
+static inline void _Thread_queue_Destroy(
Thread_queue_Control *the_thread_queue
)
{