forked from Imagelibrary/rtems
score: Doxygen Clean Up Task #2
This commit is contained in:
committed by
Jennifer Averett
parent
3cf4031c19
commit
319cb20efb
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* @ingroup Score
|
||||
*
|
||||
* @brief Basic definitions.
|
||||
* @brief Basic Definitions
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -20,6 +20,13 @@
|
||||
#ifndef _RTEMS_BASEDEFS_H
|
||||
#define _RTEMS_BASEDEFS_H
|
||||
|
||||
/**
|
||||
* @defgroup ScoreBaseDefs Basic Definitions
|
||||
*
|
||||
* @ingroup Score
|
||||
*/
|
||||
/**@{*/
|
||||
|
||||
#include <rtems/score/cpuopts.h>
|
||||
|
||||
#ifndef ASM
|
||||
@@ -189,4 +196,6 @@
|
||||
typedef void * proc_ptr;
|
||||
#endif
|
||||
|
||||
#endif /* _RTEMS_BASEDEFS_H */
|
||||
/**@}*/
|
||||
|
||||
#endif /* _RTEMS_BASEDEFS_H */
|
||||
@@ -1,7 +1,9 @@
|
||||
/**
|
||||
* @file rtems/score/bitfield.h
|
||||
* @file rtems/score/bitfield.h
|
||||
*
|
||||
* This include file contains all bit field manipulation routines.
|
||||
* @brief Bit Field Manipulation Routines
|
||||
*
|
||||
* This include file contains all bit field manipulation routines.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -64,6 +66,8 @@ const unsigned char __log2table[256] = {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Gets the @a _bit_number of the first bit set in the specified value.
|
||||
*
|
||||
* This routine returns the @a _bit_number of the first bit set
|
||||
* in the specified value. The correspondence between @a _bit_number
|
||||
* and actual bit position is processor dependent. The search for
|
||||
@@ -103,4 +107,4 @@ const unsigned char __log2table[256] = {
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/copyrt.h
|
||||
*
|
||||
* @brief Copyright Notice for RTEMS
|
||||
*
|
||||
* This include file contains the copyright notice for RTEMS
|
||||
* which is included in every binary copy of the executive.
|
||||
*/
|
||||
@@ -17,6 +19,13 @@
|
||||
#ifndef _RTEMS_SCORE_COPYRT_H
|
||||
#define _RTEMS_SCORE_COPYRT_H
|
||||
|
||||
/**
|
||||
* @defgroup SuperCore RTEMS Copyright Notice
|
||||
*
|
||||
* @ingroup Score
|
||||
*/
|
||||
/**@{*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -36,5 +45,6 @@ extern const char _Copyright_Notice[];
|
||||
}
|
||||
#endif
|
||||
|
||||
/**@}*/
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/coremsg.h
|
||||
*
|
||||
* @brief Constants and Structures Associated with the Message Queue Handler.
|
||||
*
|
||||
* This include file contains all the constants and structures associated
|
||||
* with the Message queue Handler.
|
||||
*/
|
||||
@@ -64,7 +66,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Message Queue MP Callback Prototype
|
||||
* @brief Callout provides to support global/multiprocessor operations.
|
||||
*
|
||||
* The following type defines the callout which the API provides
|
||||
* to support global/multiprocessor operations on message_queues.
|
||||
@@ -75,7 +77,7 @@ typedef void ( *CORE_message_queue_API_mp_support_callout )(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Message Buffer Contents Management Structure
|
||||
* @brief Data types needed to manipulate the contents of message buffers.
|
||||
*
|
||||
* The following defines the data types needed to manipulate
|
||||
* the contents of message buffers.
|
||||
@@ -91,7 +93,7 @@ typedef struct {
|
||||
} CORE_message_queue_Buffer;
|
||||
|
||||
/**
|
||||
* @brief Message Structure
|
||||
* @brief The organization of a message buffer.
|
||||
*
|
||||
* The following records define the organization of a message
|
||||
* buffer.
|
||||
@@ -108,7 +110,7 @@ typedef struct {
|
||||
} CORE_message_queue_Buffer_control;
|
||||
|
||||
/**
|
||||
* @brief Message Queue Blocking Disciplines
|
||||
* @brief The possible blocking disciplines for a message queue.
|
||||
*
|
||||
* This enumerated types defines the possible blocking disciplines
|
||||
* for a message queue.
|
||||
@@ -121,7 +123,7 @@ typedef enum {
|
||||
} CORE_message_queue_Disciplines;
|
||||
|
||||
/**
|
||||
* @brief Message Priority for Appending
|
||||
* @brief Used when appending messages onto a message queue.
|
||||
*
|
||||
* This is the priority constant used when appending messages onto
|
||||
* a message queue.
|
||||
@@ -129,7 +131,7 @@ typedef enum {
|
||||
#define CORE_MESSAGE_QUEUE_SEND_REQUEST INT_MAX
|
||||
|
||||
/**
|
||||
* @brief Message Priority for Prepending
|
||||
* @brief Used when prepending messages onto a message queue.
|
||||
*
|
||||
* This is the priority constant used when prepending messages onto
|
||||
* a message queue.
|
||||
@@ -137,7 +139,7 @@ typedef enum {
|
||||
#define CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN
|
||||
|
||||
/**
|
||||
* @brief Message Insertion Operation Types
|
||||
* @brief The modes in which a message may be submitted to a message queue.
|
||||
*
|
||||
* The following type details the modes in which a message
|
||||
* may be submitted to a message queue. The message may be posted
|
||||
@@ -149,7 +151,7 @@ typedef enum {
|
||||
typedef int CORE_message_queue_Submit_types;
|
||||
|
||||
/**
|
||||
* @brief Core Message Queue Return Statuses
|
||||
* @brief The possible set of Core Message Queue handler return statuses.
|
||||
*
|
||||
* This enumerated type defines the possible set of Core Message
|
||||
* Queue handler return statuses.
|
||||
@@ -178,14 +180,14 @@ typedef enum {
|
||||
} CORE_message_queue_Status;
|
||||
|
||||
/**
|
||||
* @brief Core Message Queue Last Status
|
||||
* @brief Core message queue last status value.
|
||||
*
|
||||
* This is the last status value.
|
||||
*/
|
||||
#define CORE_MESSAGE_QUEUE_STATUS_LAST CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT
|
||||
|
||||
/**
|
||||
* @brief Message Queue Attributes Type
|
||||
* @brief Control block used to manage the attributes of each message queue.
|
||||
*
|
||||
* The following defines the control block used to manage the
|
||||
* attributes of each message queue.
|
||||
@@ -197,7 +199,7 @@ typedef struct {
|
||||
|
||||
#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
|
||||
/**
|
||||
* @brief Message Queue Notification Callback Prototype
|
||||
* @brief Type for a notification handler.
|
||||
*
|
||||
* The following defines the type for a Notification handler. A
|
||||
* notification handler is invoked when the message queue makes a
|
||||
@@ -207,10 +209,10 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Core Message Queue Control Structure
|
||||
* @brief Control block used to manage each message queue.
|
||||
*
|
||||
* The following defines the control block used to manage each
|
||||
* Message Queue
|
||||
* Message Queue.
|
||||
*/
|
||||
typedef struct {
|
||||
/** This field is the Waiting Queue used to manage the set of tasks
|
||||
@@ -256,15 +258,15 @@ typedef struct {
|
||||
} CORE_message_queue_Control;
|
||||
|
||||
/**
|
||||
* @brief Initialize a Message Queue
|
||||
*
|
||||
* @brief Initialize a message queue.
|
||||
*
|
||||
* DESCRIPTION:
|
||||
*
|
||||
* This package is the implementation of the CORE Message Queue Handler.
|
||||
* This core object provides task synchronization and communication functions
|
||||
* via messages passed to queue objects.
|
||||
*
|
||||
* This routine initializes @a the_message_queue
|
||||
* This routine initializes @a the_message_queue
|
||||
* based on the parameters passed.
|
||||
*
|
||||
* @param[in] the_message_queue points to the message queue to initialize
|
||||
@@ -275,7 +277,7 @@ typedef struct {
|
||||
* @param[in] maximum_message_size is the size of largest message that
|
||||
* may be sent to this message queue instance
|
||||
*
|
||||
* @return true if the message queue can be initialized. In general,
|
||||
* @retval true if the message queue can be initialized. In general,
|
||||
* false will only be returned if memory for the pending
|
||||
* messages cannot be allocated.
|
||||
*/
|
||||
@@ -287,8 +289,8 @@ bool _CORE_message_queue_Initialize(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Close a Message Queue
|
||||
*
|
||||
* @brief Close a message queue.
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* This package is the implementation of the CORE Message Queue Handler.
|
||||
* This core object provides task synchronization and communication functions
|
||||
@@ -310,8 +312,8 @@ void _CORE_message_queue_Close(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Flush Pending Messages
|
||||
*
|
||||
* @brief Flush pending messages.
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* This package is the implementation of the CORE Message Queue Handler.
|
||||
* This core object provides task synchronization and communication functions
|
||||
@@ -322,21 +324,21 @@ void _CORE_message_queue_Close(
|
||||
*
|
||||
* @param[in] the_message_queue points to the message queue to flush
|
||||
*
|
||||
* @return This method returns the number of message pending messages flushed.
|
||||
* @retval This method returns the number of message pending messages flushed.
|
||||
*/
|
||||
uint32_t _CORE_message_queue_Flush(
|
||||
CORE_message_queue_Control *the_message_queue
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Flush Messages Support Routine
|
||||
* @brief Flush all outstanding messages.
|
||||
*
|
||||
* This routine flushes all outstanding messages and returns
|
||||
* them to the inactive message chain.
|
||||
*
|
||||
* @param[in] the_message_queue points to the message queue to flush
|
||||
*
|
||||
* @return This method returns the number of pending messages flushed.
|
||||
* @retval This method returns the number of pending messages flushed.
|
||||
*
|
||||
* - INTERRUPT LATENCY:
|
||||
* + single case
|
||||
@@ -347,15 +349,15 @@ uint32_t _CORE_message_queue_Flush_support(
|
||||
|
||||
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
|
||||
/**
|
||||
* @brief Flush Waiting Threads.
|
||||
* @brief Flush waiting threads.
|
||||
*
|
||||
* This function flushes the threads which are blocked on
|
||||
* @a the_message_queue's pending message queue. They are
|
||||
* unblocked whether blocked sending or receiving. It returns
|
||||
* unblocked whether blocked sending or receiving. It returns
|
||||
* the number of messages flushed from the queue.
|
||||
*
|
||||
* @param[in] the_message_queue points to the message queue to flush
|
||||
* @return number of messages flushed from the queue
|
||||
* @retval number of messages flushed from the queue
|
||||
*/
|
||||
void _CORE_message_queue_Flush_waiting_threads(
|
||||
CORE_message_queue_Control *the_message_queue
|
||||
@@ -363,8 +365,8 @@ uint32_t _CORE_message_queue_Flush_support(
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Broadcast a Message to the Message Queue
|
||||
*
|
||||
* @brief Broadcast a message to the message queue.
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* This package is the implementation of the CORE Message Queue Handler.
|
||||
* This core object provides task synchronization and communication functions
|
||||
@@ -382,8 +384,8 @@ uint32_t _CORE_message_queue_Flush_support(
|
||||
* a thread that is unblocked is actually a remote thread.
|
||||
* @param[out] count points to the variable that will contain the
|
||||
* number of tasks that are sent this message
|
||||
* @return @a *count will contain the number of messages sent
|
||||
* @return indication of the successful completion or reason for failure
|
||||
* @retval @a *count will contain the number of messages sent
|
||||
* @retval indication of the successful completion or reason for failure
|
||||
*/
|
||||
CORE_message_queue_Status _CORE_message_queue_Broadcast(
|
||||
CORE_message_queue_Control *the_message_queue,
|
||||
@@ -395,7 +397,7 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Submit a Message to the Message Queue
|
||||
* @brief Submit a message to the message queue.
|
||||
*
|
||||
* This routine implements the send and urgent message functions. It
|
||||
* processes a message that is to be submitted to the designated
|
||||
@@ -417,7 +419,7 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
|
||||
* if the message queue is full.
|
||||
* @param[in] timeout is the maximum number of clock ticks that the calling
|
||||
* thread is willing to block if the message queue is full.
|
||||
* @return indication of the successful completion or reason for failure
|
||||
* @retval indication of the successful completion or reason for failure
|
||||
*/
|
||||
CORE_message_queue_Status _CORE_message_queue_Submit(
|
||||
CORE_message_queue_Control *the_message_queue,
|
||||
@@ -431,8 +433,8 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Size a Message from the Message Queue
|
||||
*
|
||||
* @brief Size a message from the message queue.
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* This package is the implementation of the CORE Message Queue Handler.
|
||||
* This core object provides task synchronization and communication functions
|
||||
@@ -455,9 +457,9 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
|
||||
* @param[in] timeout is the maximum number of clock ticks that the calling
|
||||
* thread is willing to block if the message queue is empty.
|
||||
*
|
||||
* @return indication of the successful completion or reason for failure
|
||||
* @retval indication of the successful completion or reason for failure
|
||||
* @note Returns message priority via return are in TCB.
|
||||
*
|
||||
*
|
||||
* - INTERRUPT LATENCY:
|
||||
* + available
|
||||
* + wait
|
||||
@@ -472,8 +474,8 @@ void _CORE_message_queue_Seize(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Insert a Message into the Message Queue
|
||||
*
|
||||
* @brief Insert a message into the message queue.
|
||||
*
|
||||
* This kernel routine inserts the specified message into the
|
||||
* message queue. It is assumed that the message has been filled
|
||||
* in before this routine is called.
|
||||
@@ -482,7 +484,7 @@ void _CORE_message_queue_Seize(
|
||||
* @param[in] the_message is the message to enqueue
|
||||
* @param[in] submit_type determines whether the message is prepended,
|
||||
* appended, or enqueued in priority order.
|
||||
*
|
||||
*
|
||||
* - INTERRUPT LATENCY:
|
||||
* + insert
|
||||
*/
|
||||
@@ -503,4 +505,4 @@ void _CORE_message_queue_Insert_message(
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/coremutex.h
|
||||
*
|
||||
* @brief Constants and Structures Associated with the Mutex Handler
|
||||
*
|
||||
* This include file contains all the constants and structures associated
|
||||
* with the Mutex Handler. A mutex is an enhanced version of the standard
|
||||
* Dijkstra binary semaphore used to provide synchronization and mutual
|
||||
@@ -40,7 +42,7 @@ extern "C" {
|
||||
#include <rtems/score/sysstate.h>
|
||||
|
||||
/**
|
||||
* @brief MP Support Callback Prototype
|
||||
* @brief Callout which provides to support global/multiprocessor operations.
|
||||
*
|
||||
* The following type defines the callout which the API provides
|
||||
* to support global/multiprocessor operations on mutexes.
|
||||
@@ -51,7 +53,7 @@ typedef void ( *CORE_mutex_API_mp_support_callout )(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Blocking Disciplines Enumerated Type
|
||||
* @brief The blocking disciplines for a mutex.
|
||||
*
|
||||
* This enumerated type defines the blocking disciplines for a mutex.
|
||||
*/
|
||||
@@ -71,7 +73,7 @@ typedef enum {
|
||||
} CORE_mutex_Disciplines;
|
||||
|
||||
/**
|
||||
* @brief Mutex method return statuses
|
||||
* @brief The possible Mutex handler return statuses.
|
||||
*
|
||||
* This enumerated type defines the possible Mutex handler return statuses.
|
||||
*/
|
||||
@@ -118,14 +120,14 @@ typedef enum {
|
||||
} CORE_mutex_Status;
|
||||
|
||||
/**
|
||||
* @brief Core Mutex Last Status
|
||||
* @brief The last status value.
|
||||
*
|
||||
* This is the last status value.
|
||||
*/
|
||||
#define CORE_MUTEX_STATUS_LAST CORE_MUTEX_STATUS_CEILING_VIOLATED
|
||||
|
||||
/**
|
||||
* @brief Mutex Lock Nesting Behavior Enumeration
|
||||
* @brief The possible behaviors for lock nesting.
|
||||
*
|
||||
* This enumerated type defines the possible behaviors for
|
||||
* lock nesting.
|
||||
@@ -170,7 +172,7 @@ typedef enum {
|
||||
#define CORE_MUTEX_LOCKED 0
|
||||
|
||||
/**
|
||||
* @brief Core Mutex Attributes
|
||||
* @brief The control block used to manage attributes of each mutex.
|
||||
*
|
||||
* The following defines the control block used to manage the
|
||||
* attributes of each mutex.
|
||||
@@ -195,7 +197,8 @@ typedef struct {
|
||||
} CORE_mutex_Attributes;
|
||||
|
||||
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
|
||||
/*@brief Core Mutex Lock_Chain Struct
|
||||
/**
|
||||
* @brief The control block to manage lock chain of priority inheritance mutex.
|
||||
*
|
||||
* The following defines the control block used to manage lock chain of
|
||||
* priority inheritance mutex.
|
||||
@@ -214,7 +217,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Core Mutex Control Structure
|
||||
* @brief Control block used to manage each mutex.
|
||||
*
|
||||
* The following defines the control block used to manage each mutex.
|
||||
*/
|
||||
@@ -251,7 +254,7 @@ typedef struct {
|
||||
} CORE_mutex_Control;
|
||||
|
||||
/**
|
||||
* @brief Initialize a Core Mutex
|
||||
* @brief Initializes the mutex based on the parameters passed.
|
||||
*
|
||||
* This routine initializes the mutex based on the parameters passed.
|
||||
*
|
||||
@@ -260,7 +263,7 @@ typedef struct {
|
||||
* mutex instance
|
||||
* @param[in] initial_lock is the initial value of the mutex
|
||||
*
|
||||
* @return This method returns CORE_MUTEX_STATUS_SUCCESSFUL if successful.
|
||||
* @retval This method returns CORE_MUTEX_STATUS_SUCCESSFUL if successful.
|
||||
*/
|
||||
CORE_mutex_Status _CORE_mutex_Initialize(
|
||||
CORE_mutex_Control *the_mutex,
|
||||
@@ -270,7 +273,7 @@ CORE_mutex_Status _CORE_mutex_Initialize(
|
||||
|
||||
#ifndef __RTEMS_APPLICATION__
|
||||
/**
|
||||
* @brief Seize Mutex with Quick Success Path
|
||||
* @brief Attempt to receive a unit from the_mutex.
|
||||
*
|
||||
* This routine attempts to receive a unit from the_mutex.
|
||||
* If a unit is available or if the wait flag is false, then the routine
|
||||
@@ -280,7 +283,7 @@ CORE_mutex_Status _CORE_mutex_Initialize(
|
||||
* @param[in] the_mutex is the mutex to attempt to lock
|
||||
* @param[in] level_p is the interrupt level holder
|
||||
*
|
||||
* @return This routine returns 0 if "trylock" can resolve whether or not
|
||||
* @retval This routine returns 0 if "trylock" can resolve whether or not
|
||||
* the mutex is immediately obtained or there was an error attempting to
|
||||
* get it. It returns 1 to indicate that the caller cannot obtain
|
||||
* the mutex and will have to block to do so.
|
||||
@@ -296,7 +299,8 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body(
|
||||
|
||||
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
|
||||
/**
|
||||
* @brief Trylock CORE Mutex Seize Interrupt
|
||||
* @brief Interrupt trylock CORE mutex seize.
|
||||
*
|
||||
* When doing test coverage analysis or trying to minimize the code
|
||||
* space for RTEMS, it is often helpful to not inline this method
|
||||
* multiple times. It is fairly large and has a high branch complexity
|
||||
@@ -322,7 +326,7 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body(
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Seize Mutex with Blocking
|
||||
* @brief Performs the blocking portion of a mutex obtain.
|
||||
*
|
||||
* This routine performs the blocking portion of a mutex obtain.
|
||||
* It is an actual subroutine and is not implemented as something
|
||||
@@ -336,13 +340,13 @@ void _CORE_mutex_Seize_interrupt_blocking(
|
||||
Watchdog_Interval timeout
|
||||
);
|
||||
/**
|
||||
* @brief Sieze Interrupt Wrapper
|
||||
* @brief Verifies that a mutex blocking seize is performed safely.
|
||||
*
|
||||
* This macro is to verify that a mutex blocking seize is
|
||||
* performed from a safe system state. For example, one
|
||||
* cannot block inside an isr.
|
||||
*
|
||||
* @return this method returns true if dispatch is in an unsafe state.
|
||||
* @retval this method returns true if dispatch is in an unsafe state.
|
||||
*/
|
||||
#ifdef RTEMS_SMP
|
||||
#define _CORE_mutex_Check_dispatch_for_seize(_wait) 0
|
||||
@@ -354,7 +358,7 @@ void _CORE_mutex_Seize_interrupt_blocking(
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Sieze Interrupt Wrapper
|
||||
* @brief Attempt to obtain the mutex.
|
||||
*
|
||||
* This routine attempts to obtain the mutex. If the mutex is available,
|
||||
* then it will return immediately. Otherwise, it will invoke the
|
||||
@@ -430,7 +434,7 @@ void _CORE_mutex_Seize_interrupt_blocking(
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Surrender the Mutex
|
||||
* @brief Frees a unit to the mutex.
|
||||
*
|
||||
* This routine frees a unit to the mutex. If a task was blocked waiting for
|
||||
* a unit from this mutex, then that task will be readied and the unit
|
||||
@@ -441,7 +445,7 @@ void _CORE_mutex_Seize_interrupt_blocking(
|
||||
* @param[in] api_mutex_mp_support is the routine that will be called when
|
||||
* unblocking a remote mutex
|
||||
*
|
||||
* @return an indication of whether the routine succeeded or failed
|
||||
* @retval an indication of whether the routine succeeded or failed
|
||||
*/
|
||||
CORE_mutex_Status _CORE_mutex_Surrender(
|
||||
CORE_mutex_Control *the_mutex,
|
||||
@@ -450,7 +454,7 @@ CORE_mutex_Status _CORE_mutex_Surrender(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Flush all waiting threads
|
||||
* @brief Flush all waiting threads.
|
||||
*
|
||||
* This routine assists in the deletion of a mutex by flushing the associated
|
||||
* wait queue.
|
||||
@@ -477,4 +481,4 @@ void _CORE_mutex_Flush(
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/corerwlock.h
|
||||
*
|
||||
* @brief Constants and Structures Associated with the RWLock Handler
|
||||
*
|
||||
* This include file contains all the constants and structures associated
|
||||
* with the RWLock Handler.
|
||||
*/
|
||||
@@ -125,7 +127,7 @@ typedef struct {
|
||||
} CORE_RWLock_Control;
|
||||
|
||||
/**
|
||||
* @brief Initialize a RWlock
|
||||
* @brief Initialize a RWlock.
|
||||
*
|
||||
* This routine initializes the RWLock based on the parameters passed.
|
||||
*
|
||||
@@ -138,7 +140,8 @@ void _CORE_RWLock_Initialize(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Obtain RWLock for reading
|
||||
* @brief Obtain RWLock for reading.
|
||||
*
|
||||
* This routine attempts to obtain the RWLock for read access.
|
||||
*
|
||||
* @param[in] the_rwlock is the RWLock to wait for
|
||||
@@ -161,8 +164,8 @@ void _CORE_RWLock_Obtain_for_reading(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief RWLock Obtain for Writing
|
||||
*
|
||||
* @brief Obtain RWLock for writing.
|
||||
*
|
||||
* This routine attempts to obtain the RWLock for write exclusive access.
|
||||
*
|
||||
* @param[in] the_rwlock is the RWLock to wait for
|
||||
@@ -184,14 +187,14 @@ void _CORE_RWLock_Obtain_for_writing(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Releases the RWLock
|
||||
* @brief Release the RWLock.
|
||||
*
|
||||
* This routine manually releases @a the_rwlock. All of the threads waiting
|
||||
* for the RWLock will be readied.
|
||||
*
|
||||
* @param[in] the_rwlock is the RWLock to surrender
|
||||
*
|
||||
* @return Status is returned to indicate successful or failure.
|
||||
* @retval Status is returned to indicate successful or failure.
|
||||
*/
|
||||
CORE_RWLock_Status _CORE_RWLock_Release(
|
||||
CORE_RWLock_Control *the_rwlock
|
||||
@@ -214,7 +217,7 @@ CORE_RWLock_Status _CORE_RWLock_Release(
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief RWLock Specific Thread Queue Timeout
|
||||
* @brief RWLock specific thread queue timeout.
|
||||
*
|
||||
* This routine processes a thread which timeouts while waiting on
|
||||
* an RWLock's thread queue. It is called by the watchdog handler.
|
||||
@@ -240,4 +243,4 @@ void _CORE_RWLock_Timeout(
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* @ingroup ScoreHeap
|
||||
*
|
||||
* @brief Heap Handler API.
|
||||
* @brief Heap Handler API
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -786,4 +786,4 @@ Heap_Block *_Heap_Block_allocate(
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/interr.h
|
||||
*
|
||||
* @brief Constants and Prototypes Related to the Internal Error Handler
|
||||
*
|
||||
* This include file contains constants and prototypes related
|
||||
* to the Internal Error Handler.
|
||||
*/
|
||||
@@ -214,4 +216,4 @@ void _Internal_error_Occurred(
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/rbtree.h
|
||||
*
|
||||
* @brief Constants and Structures Associated with the Red-Black Tree Handler
|
||||
*
|
||||
* This include file contains all the constants and structures associated
|
||||
* with the Red-Black Tree Handler.
|
||||
*/
|
||||
@@ -80,7 +82,7 @@ struct RBTree_Node_struct {
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief macro to return the structure containing the @a node.
|
||||
* @brief Macro to return the structure containing the @a node.
|
||||
*
|
||||
* This macro returns a pointer of type @a container_type that points
|
||||
* to the structure containing @a node, where @a node_field_name is the
|
||||
@@ -184,12 +186,12 @@ RBTree_Control name = RBTREE_INITIALIZER_EMPTY(name)
|
||||
RBTree_Node name = RBTREE_NODE_INITIALIZER_EMPTY(name)
|
||||
|
||||
/**
|
||||
* @brief Initialize a RBTree Header
|
||||
* @brief Initialize a RBTree Header.
|
||||
*
|
||||
* This routine initializes @a the_rbtree structure to manage the
|
||||
* contiguous array of @a number_nodes nodes which starts at
|
||||
* @a starting_address. Each node is of @a node_size bytes.
|
||||
*
|
||||
*
|
||||
* @param[in] the_rbtree is the pointer to rbtree header
|
||||
* @param[in] starting_address is the starting address of first node
|
||||
* @param[in] number_nodes is the number of nodes in rbtree
|
||||
@@ -205,13 +207,13 @@ void _RBTree_Initialize(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Obtain the min or max node of a rbtree
|
||||
* @brief Obtain the min or max node of a rbtree.
|
||||
*
|
||||
* This function removes the min or max node from @a the_rbtree and returns
|
||||
* a pointer to that node. If @a the_rbtree is empty, then NULL is returned.
|
||||
* @a dir specifies whether to return the min (0) or max (1).
|
||||
*
|
||||
* @return This method returns a pointer to a node. If a node was removed,
|
||||
* @retval This method returns a pointer to a node. If a node was removed,
|
||||
* then a pointer to that node is returned. If @a the_rbtree was
|
||||
* empty, then NULL is returned.
|
||||
*
|
||||
@@ -223,20 +225,20 @@ RBTree_Node *_RBTree_Get(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Find the node with given key in the tree
|
||||
* @brief Find the node with given key in the tree.
|
||||
*
|
||||
* This function returns a pointer to the node with key equal to a key
|
||||
* of @a the_node if it exists in the Red-Black Tree @a the_rbtree,
|
||||
* and NULL if not.
|
||||
*
|
||||
*
|
||||
* @param[in] the_rbtree pointer to rbtree control
|
||||
* @param[in] the_node node with the key to search for
|
||||
* @return This method returns pointer to control header of rbtree. *
|
||||
* @retval This method returns pointer to control header of rbtree. *
|
||||
* If there is no control header available (the node is not part
|
||||
* of a tree), then NULL is returned. *
|
||||
*
|
||||
* - INTERRUPT LATENCY:
|
||||
* + single case
|
||||
* + single case
|
||||
*/
|
||||
RBTree_Node *_RBTree_Find(
|
||||
RBTree_Control *the_rbtree,
|
||||
@@ -244,7 +246,7 @@ RBTree_Node *_RBTree_Find(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Find the control structure of the tree containing the given node
|
||||
* @brief Find the control structure of the tree containing the given node.
|
||||
*
|
||||
* This function returns a pointer called @a return_header to the control structure of the tree
|
||||
* containing @a the_node, if it exists, and @a NULL if not.
|
||||
@@ -252,7 +254,7 @@ RBTree_Node *_RBTree_Find(
|
||||
* @param[in] the_node is the pointer to the rbtree node.
|
||||
* @param[out] return_header is the pointer to control header of rbtree.
|
||||
* @param[out] NULL is returned if there is no control header available.
|
||||
*
|
||||
*
|
||||
* -INTERRUPT LATENCY:
|
||||
* + single case
|
||||
*/
|
||||
@@ -261,7 +263,7 @@ RBTree_Control *_RBTree_Find_header(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Insert a Node (unprotected)
|
||||
* @brief Insert @a the_node on the Red-Black Tree @a the_rbtree (unprotected).
|
||||
*
|
||||
* This routine inserts @a the_node on the Red-Black Tree @a the_rbtree.
|
||||
*
|
||||
@@ -279,7 +281,7 @@ RBTree_Node *_RBTree_Insert_unprotected(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Insert a node on a rbtree
|
||||
* @brief Insert a node on a rbtree.
|
||||
*
|
||||
* This routine inserts @a the_node on the tree @a the_rbtree.
|
||||
*
|
||||
@@ -298,7 +300,7 @@ RBTree_Node *_RBTree_Insert(
|
||||
|
||||
|
||||
/**
|
||||
* @brief Extract a Node (unprotected)
|
||||
* @brief Extracts (removes) @a the_node from @a the_rbtree (unprotected).
|
||||
*
|
||||
* This routine extracts (removes) @a the_node from @a the_rbtree.
|
||||
*
|
||||
@@ -311,7 +313,7 @@ void _RBTree_Extract_unprotected(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Delete a node from the rbtree
|
||||
* @brief Delete a node from the rbtree.
|
||||
*
|
||||
* This routine deletes @a the_node from @a the_rbtree.
|
||||
*
|
||||
@@ -391,4 +393,4 @@ void _RBTree_Iterate_unprotected(
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/schedulercbs.h
|
||||
*
|
||||
* @brief Thread manipulation for the CBS scheduler
|
||||
*
|
||||
* This include file contains all the constants and structures associated
|
||||
* with the manipulation of threads for the CBS scheduler.
|
||||
*/
|
||||
@@ -31,8 +33,11 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreScheduler
|
||||
* @defgroup ScoreScheduler CBS Scheduler
|
||||
*
|
||||
* @ingroup Score
|
||||
*
|
||||
* @addtogroup ScoreScheduler
|
||||
*/
|
||||
/**@{*/
|
||||
|
||||
@@ -131,12 +136,12 @@ typedef struct {
|
||||
extern Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
|
||||
|
||||
/**
|
||||
* @brief Unblocks a Thread from the Queue
|
||||
* @brief Unblocks a thread from the queue.
|
||||
*
|
||||
* This routine adds @a the_thread to the scheduling decision, that is,
|
||||
* adds it to the ready queue and updates any appropriate scheduling
|
||||
* variables, for example the heir thread. It is checked whether the
|
||||
* remaining budget is sufficient. If not, the thread continues as a
|
||||
* variables, for example the heir thread. It is checked whether the
|
||||
* remaining budget is sufficient. If not, the thread continues as a
|
||||
* new job in order to protect concurrent threads.
|
||||
*
|
||||
* @param[in] the_thread will be unblocked.
|
||||
@@ -148,7 +153,7 @@ void _Scheduler_CBS_Unblock(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler CBS Release job
|
||||
* @brief Called when a new job of task is released.
|
||||
*
|
||||
* This routine is called when a new job of task is released.
|
||||
* It is called only from Rate Monotonic manager in the beginning
|
||||
@@ -169,16 +174,16 @@ void _Scheduler_CBS_Release_job (
|
||||
*
|
||||
* Initializes the CBS library.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Initialize(void);
|
||||
|
||||
/**
|
||||
* @brief Attach Scheduler CBS Thread
|
||||
* @brief Attach a task to an already existing server.
|
||||
*
|
||||
* Attach a task to an already existing server.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Attach_thread (
|
||||
Scheduler_CBS_Server_id server_id,
|
||||
@@ -186,11 +191,11 @@ int _Scheduler_CBS_Attach_thread (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_CBS_Detach_thread
|
||||
* @brief Detach from the CBS Server.
|
||||
*
|
||||
* Detach from the CBS Server.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Detach_thread (
|
||||
Scheduler_CBS_Server_id server_id,
|
||||
@@ -198,20 +203,20 @@ int _Scheduler_CBS_Detach_thread (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_CBS_Cleanup
|
||||
* @brief Cleanup resources associated to the CBS Library.
|
||||
*
|
||||
* Cleanup resources associated to the CBS Library.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Cleanup (void);
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_CBS_Create_server
|
||||
* @brief Create a new server with specified parameters.
|
||||
*
|
||||
* Create a new server with specified parameters.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Create_server (
|
||||
Scheduler_CBS_Parameters *params,
|
||||
@@ -220,25 +225,25 @@ int _Scheduler_CBS_Create_server (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_CBS_Destroy_server
|
||||
* @brief Detach all tasks from a server and destroy it.
|
||||
*
|
||||
* Detach all tasks from a server and destroy it.
|
||||
*
|
||||
* @param[in] server_id is the ID of the server
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Destroy_server (
|
||||
Scheduler_CBS_Server_id server_id
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_CBS_Get_approved_budget
|
||||
* @brief Retrieve the approved budget.
|
||||
*
|
||||
* Retrieve the budget that has been approved for the subsequent
|
||||
* server instances.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Get_approved_budget (
|
||||
Scheduler_CBS_Server_id server_id,
|
||||
@@ -246,11 +251,11 @@ int _Scheduler_CBS_Get_approved_budget (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_CBS_Get_remaining_budget
|
||||
* @brief Retrieve remaining budget for the current server instance.
|
||||
*
|
||||
* Retrieve remaining budget for the current server instance.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Get_remaining_budget (
|
||||
Scheduler_CBS_Server_id server_id,
|
||||
@@ -258,15 +263,15 @@ int _Scheduler_CBS_Get_remaining_budget (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Get relative time info
|
||||
* @brief Get relative time info.
|
||||
*
|
||||
* Retrieve time info relative to @a server_id. The server status code is returned.
|
||||
*
|
||||
* @param[in] server_id is the server to get the status code from.
|
||||
* @param[in] exec_time is the execution time.
|
||||
* @param[in] abs_time is not apparently used.
|
||||
* @param[in] abs_time is not apparently used.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Get_execution_time (
|
||||
Scheduler_CBS_Server_id server_id,
|
||||
@@ -275,11 +280,11 @@ int _Scheduler_CBS_Get_execution_time (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_CBS_Get_parameters
|
||||
* @brief Retrieve CBS scheduling parameters.
|
||||
*
|
||||
* Retrieve CBS scheduling parameters.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Get_parameters (
|
||||
Scheduler_CBS_Server_id server_id,
|
||||
@@ -287,12 +292,12 @@ int _Scheduler_CBS_Get_parameters (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler CBS Get Server id
|
||||
* @brief Get a thread server id.
|
||||
*
|
||||
* Get a thread server id, or SCHEDULER_CBS_ERROR_NOT_FOUND if it is not
|
||||
* attached to any server.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Get_server_id (
|
||||
rtems_id task_id,
|
||||
@@ -300,14 +305,14 @@ int _Scheduler_CBS_Get_server_id (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Set Parameters for CBS Scheduling
|
||||
* @brief Set parameters for CBS scheduling.
|
||||
*
|
||||
* Change CBS scheduling parameters.
|
||||
*
|
||||
* @param[in] server_id is the ID of the server.
|
||||
* @param[in] parameters are the parameters to set.
|
||||
*
|
||||
* @return status code.
|
||||
* @retval status code.
|
||||
*/
|
||||
int _Scheduler_CBS_Set_parameters (
|
||||
Scheduler_CBS_Server_id server_id,
|
||||
@@ -315,7 +320,7 @@ int _Scheduler_CBS_Set_parameters (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler CBS Budget overrun
|
||||
* @brief Invoked when a limited time quantum is exceeded.
|
||||
*
|
||||
* This routine is invoked when a limited time quantum is exceeded.
|
||||
*/
|
||||
@@ -324,7 +329,7 @@ void _Scheduler_CBS_Budget_callout(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler CBS Allocate
|
||||
* @brief Allocates CBS specific information of @a the_thread.
|
||||
*
|
||||
* This routine allocates CBS specific information of @a the_thread.
|
||||
*
|
||||
@@ -341,4 +346,4 @@ void *_Scheduler_CBS_Allocate(
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/schedulerpriority.h
|
||||
*
|
||||
* @brief Thread Manipulation with the Priority-Based Scheduler
|
||||
*
|
||||
* This include file contains all the constants and structures associated
|
||||
* with the manipulation of threads for the priority-based scheduler.
|
||||
*/
|
||||
@@ -26,8 +28,11 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreScheduler
|
||||
* @defgroup ScoreScheduler Priority-based Scheduler
|
||||
*
|
||||
* @ingroup Score
|
||||
*
|
||||
* @addtogroup ScoreScheduler
|
||||
*/
|
||||
/**@{*/
|
||||
|
||||
@@ -64,13 +69,13 @@ typedef struct {
|
||||
} Scheduler_priority_Per_thread;
|
||||
|
||||
/**
|
||||
* @brief Initialize Scheduler Priority
|
||||
* @brief Initializes the priority scheduler.
|
||||
* This routine initializes the priority scheduler.
|
||||
*/
|
||||
void _Scheduler_priority_Initialize(void);
|
||||
|
||||
/**
|
||||
* @brief Scheduler priority Block
|
||||
* @brief Removes @a the_thread from the scheduling decision.
|
||||
*
|
||||
* This routine removes @a the_thread from the scheduling decision,
|
||||
* that is, removes it from the ready queue. It performs
|
||||
@@ -84,7 +89,7 @@ void _Scheduler_priority_Block(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief schedule entry point
|
||||
* @brief Sets the heir thread to be the next ready thread.
|
||||
*
|
||||
* This kernel routine sets the heir thread to be the next ready thread
|
||||
* by invoking the_scheduler->ready_queue->operations->first().
|
||||
@@ -92,7 +97,7 @@ void _Scheduler_priority_Block(
|
||||
void _Scheduler_priority_Schedule(void);
|
||||
|
||||
/**
|
||||
* @brief Allocate Scheduler Priority
|
||||
* @brief Allocates @a the_thread->scheduler.
|
||||
*
|
||||
* This routine allocates @a the_thread->scheduler.
|
||||
*
|
||||
@@ -104,7 +109,7 @@ void * _Scheduler_priority_Allocate(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Free Scheduler Priority
|
||||
* @brief Frees @a the_thread->scheduler.
|
||||
*
|
||||
* This routine frees @a the_thread->scheduler.
|
||||
*
|
||||
@@ -116,7 +121,7 @@ void _Scheduler_priority_Free(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Update Scheduler priority
|
||||
* @brief Update the scheduler priority.
|
||||
* This routine updates @a the_thread->scheduler based on @a the_scheduler
|
||||
* structures and thread state.
|
||||
*
|
||||
@@ -128,7 +133,7 @@ void _Scheduler_priority_Update(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler Priority Unblock
|
||||
* @brief Add @a the_thread to the scheduling decision.
|
||||
*
|
||||
* This routine adds @a the_thread to the scheduling decision,
|
||||
* that is, adds it to the ready queue and
|
||||
@@ -141,7 +146,7 @@ void _Scheduler_priority_Unblock(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler Priority Yield
|
||||
* @brief Remove the running THREAD to the rear of this chain.
|
||||
*
|
||||
* This routine is invoked when a thread wishes to voluntarily
|
||||
* transfer control of the processor to another thread in the queue.
|
||||
@@ -160,7 +165,7 @@ void _Scheduler_priority_Unblock(
|
||||
void _Scheduler_priority_Yield( void );
|
||||
|
||||
/**
|
||||
* @brief Scheduler Priority Enqueue
|
||||
* @brief Puts @a the_thread on to the priority-based ready queue.
|
||||
*
|
||||
* This routine puts @a the_thread on to the priority-based ready queue.
|
||||
*
|
||||
@@ -171,7 +176,7 @@ void _Scheduler_priority_Enqueue(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler Priority Enqueue First
|
||||
* @brief Puts @a the_thread to the head of the ready queue.
|
||||
*
|
||||
* This routine puts @a the_thread to the head of the ready queue.
|
||||
* For priority-based ready queues, the thread will be the first thread
|
||||
@@ -184,7 +189,7 @@ void _Scheduler_priority_Enqueue_first(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Removes a specific thread from scheduler
|
||||
* @brief Remove a specific thread from scheduler.
|
||||
*
|
||||
* This routine removes a specific thread from the scheduler's set
|
||||
* of ready threads.
|
||||
@@ -196,7 +201,7 @@ void _Scheduler_priority_Extract(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler priority Priority compare
|
||||
* @brief Compare two priorities.
|
||||
*
|
||||
* This routine compares two priorities.
|
||||
*/
|
||||
@@ -206,7 +211,7 @@ int _Scheduler_priority_Priority_compare(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scheduler priority Release job
|
||||
* @brief Called when a new job of task is released.
|
||||
*
|
||||
* This routine is called when a new job of task is released.
|
||||
*
|
||||
@@ -220,7 +225,7 @@ void _Scheduler_priority_Release_job (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Deterministic Priority Scheduler Tick Method
|
||||
* @brief Determines if the current thread allows timeslicing.
|
||||
*
|
||||
* This routine is invoked as part of processing each clock tick.
|
||||
* It is responsible for determining if the current thread allows
|
||||
@@ -249,4 +254,4 @@ extern Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/smp.h
|
||||
*
|
||||
* @brief Interface to the SuperCore SMP Support used Internally to RTEMS
|
||||
*
|
||||
* This include file defines the interface to the SuperCore
|
||||
* SMP support that is used internally to RTEMS.
|
||||
*/
|
||||
@@ -65,7 +67,7 @@ extern "C" {
|
||||
|
||||
#ifndef ASM
|
||||
/**
|
||||
* @brief Number of CPUs in SMP System
|
||||
* @brief Number of CPUs in a SMP system.
|
||||
*
|
||||
* This variable is set during the SMP initialization sequence to
|
||||
* indicate the number of CPUs in this system.
|
||||
@@ -73,7 +75,7 @@ extern "C" {
|
||||
SCORE_EXTERN uint32_t _SMP_Processor_count;
|
||||
|
||||
/**
|
||||
* @brief Make Request of Others CPUs
|
||||
* @brief Request of others CPUs.
|
||||
*
|
||||
* This method is invoked by RTEMS when it needs to make a request
|
||||
* of the other CPUs. It should be implemented using some type of
|
||||
@@ -87,7 +89,7 @@ void _SMP_Broadcast_message(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Request Other Cores to Perform First Context Switch
|
||||
* @brief Request other cores to perform first context switch.
|
||||
*
|
||||
* Send message to other cores requesting them to perform
|
||||
* their first context switch operation.
|
||||
@@ -95,7 +97,7 @@ void _SMP_Broadcast_message(
|
||||
void _SMP_Request_other_cores_to_perform_first_context_switch(void);
|
||||
|
||||
/**
|
||||
* @brief Request Dispatch on Other Cores
|
||||
* @brief Request dispatch on other cores.
|
||||
*
|
||||
* Send message to other cores requesting them to perform
|
||||
* a thread dispatch operation.
|
||||
@@ -103,7 +105,7 @@ void _SMP_Request_other_cores_to_perform_first_context_switch(void);
|
||||
void _SMP_Request_other_cores_to_dispatch(void);
|
||||
|
||||
/**
|
||||
* @Brief Request Other Cores to Shutdown
|
||||
* @Brief Request other cores to shutdown.
|
||||
*
|
||||
* Send message to other cores requesting them to shutdown.
|
||||
*/
|
||||
@@ -116,5 +118,7 @@ void _SMP_Request_other_cores_to_shutdown(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/**@}*/
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* @ingroup ScoreSysState
|
||||
*
|
||||
* @brief System State Handler API.
|
||||
* @brief System State Handler API
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/thread.h
|
||||
*
|
||||
* @brief Constants and Structures Related with the Thread Control Block
|
||||
*
|
||||
* This include file contains all constants and structures associated
|
||||
* with the thread control block.
|
||||
*/
|
||||
@@ -185,14 +187,14 @@ typedef enum {
|
||||
typedef void (*Thread_CPU_budget_algorithm_callout )( Thread_Control * );
|
||||
|
||||
/**
|
||||
* @brief Per Task Variable Manager Structure Forward Reference
|
||||
* @brief Forward reference to the per task variable structure..
|
||||
*
|
||||
* Forward reference to the per task variable structure.
|
||||
*/
|
||||
struct rtems_task_variable_tt;
|
||||
|
||||
/**
|
||||
* @brief Per Task Variable Manager Structure
|
||||
* @brief Internal structure used to manager per task variables.
|
||||
*
|
||||
* This is the internal structure used to manager per Task Variables.
|
||||
*/
|
||||
@@ -275,7 +277,7 @@ typedef union {
|
||||
} Thread_Wait_information_Object_argument_type;
|
||||
|
||||
/**
|
||||
* @brief Thread Blocking Management Information
|
||||
* @brief Information required to manage a thread while it is blocked.
|
||||
*
|
||||
* This contains the information required to manage a thread while it is
|
||||
* blocked and to return information to it.
|
||||
@@ -503,14 +505,14 @@ SCORE_EXTERN Thread_Control *_Thread_Allocated_fp;
|
||||
*/
|
||||
SCORE_EXTERN struct _reent **_Thread_libc_reent;
|
||||
/**
|
||||
* @brief Initialize Thread Handler
|
||||
* @brief Initialize thread handler.
|
||||
*
|
||||
* This routine performs the initialization necessary for this handler.
|
||||
*/
|
||||
void _Thread_Handler_initialization(void);
|
||||
|
||||
/**
|
||||
* @brief Create Idle Thread
|
||||
* @brief Create idle thread.
|
||||
*
|
||||
* This routine creates the idle thread.
|
||||
*
|
||||
@@ -519,7 +521,7 @@ void _Thread_Handler_initialization(void);
|
||||
void _Thread_Create_idle(void);
|
||||
|
||||
/**
|
||||
* @brief Start Thread Multitasking
|
||||
* @brief Start thread multitasking.
|
||||
*
|
||||
* This routine initiates multitasking. It is invoked only as
|
||||
* part of initialization and its invocation is the last act of
|
||||
@@ -533,7 +535,7 @@ void _Thread_Create_idle(void);
|
||||
void _Thread_Start_multitasking( void );
|
||||
|
||||
/**
|
||||
* @brief Dispatch Thread
|
||||
* @brief Dispatch thread.
|
||||
*
|
||||
* This routine is responsible for transferring control of the
|
||||
* processor from the executing thread to the heir thread. Once the
|
||||
@@ -553,7 +555,7 @@ void _Thread_Start_multitasking( void );
|
||||
void _Thread_Dispatch( void );
|
||||
|
||||
/**
|
||||
* @brief Stack Allocate Helper
|
||||
* @brief Allocate the requested stack space for the thread.
|
||||
*
|
||||
* Allocate the requested stack space for the thread.
|
||||
* Set the Start.stack field to the address of the stack.
|
||||
@@ -569,7 +571,7 @@ size_t _Thread_Stack_Allocate(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Deallocate Thread Stack
|
||||
* @brief Deallocate thread stack.
|
||||
*
|
||||
* Deallocate the Thread's stack.
|
||||
*/
|
||||
@@ -578,7 +580,8 @@ void _Thread_Stack_Free(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Initialize Thread
|
||||
* @brief Initialize thread.
|
||||
*
|
||||
* This routine initializes the specified the thread. It allocates
|
||||
* all memory associated with this thread. It completes by adding
|
||||
* the thread to the local object table so operations on this
|
||||
@@ -604,14 +607,14 @@ bool _Thread_Initialize(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Initializes Thread and Executes it
|
||||
* @brief Initializes thread and executes it.
|
||||
*
|
||||
* This routine initializes the executable information for a thread
|
||||
* and makes it ready to execute. After this routine executes, the
|
||||
* thread competes with all other threads for CPU time.
|
||||
*
|
||||
* @param the_thread is the thread to be initialized
|
||||
* @param the_prototype
|
||||
* @param the_prototype
|
||||
* @param entry_point
|
||||
* @param pointer_argument
|
||||
* @param numeric_argument
|
||||
@@ -625,7 +628,8 @@ bool _Thread_Start(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Restart Thread
|
||||
* @brief Restarts the specified thread.
|
||||
*
|
||||
* This support routine restarts the specified task in a way that the
|
||||
* next time this thread executes, it will begin execution at its
|
||||
* original starting point.
|
||||
@@ -639,7 +643,7 @@ bool _Thread_Restart(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Resets a thread to its initial state
|
||||
* @brief Resets a thread to its initial state.
|
||||
*
|
||||
* This routine resets a thread to its initial state but does
|
||||
* not restart it. Some APIs do this in separate
|
||||
@@ -656,7 +660,7 @@ void _Thread_Reset(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Close
|
||||
* @brief Frees all memory associated with the specified thread.
|
||||
*
|
||||
* This routine frees all memory associated with the specified
|
||||
* thread and removes it from the local object table so no further
|
||||
@@ -668,7 +672,7 @@ void _Thread_Close(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Ready
|
||||
* @brief Removes any set states for @a the_thread.
|
||||
*
|
||||
* This routine removes any set states for @a the_thread. It performs
|
||||
* any necessary scheduling operations including the selection of
|
||||
@@ -683,7 +687,7 @@ void _Thread_Ready(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Clear Thread state
|
||||
* @brief Clears the indicated STATES for @a the_thread.
|
||||
*
|
||||
* This routine clears the indicated STATES for @a the_thread. It performs
|
||||
* any necessary scheduling operations including the selection of
|
||||
@@ -699,13 +703,13 @@ void _Thread_Clear_state(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Sets States for a Thread
|
||||
* @brief Sets the indicated @a state for @a the_thread.
|
||||
*
|
||||
* This routine sets the indicated @a state for @a the_thread. It performs
|
||||
* any necessary scheduling operations including the selection of
|
||||
* a new heir thread.
|
||||
*
|
||||
* @param[in] the_thread is the thread to set the state for.
|
||||
* @param[in] the_thread is the thread to set the state for.
|
||||
* @param[in] state is the state to set the_thread to.
|
||||
*
|
||||
* - INTERRUPT LATENCY:
|
||||
@@ -718,7 +722,7 @@ void _Thread_Set_state(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Sets the Transient state for a Thread
|
||||
* @brief Sets the transient state for a thread.
|
||||
*
|
||||
* This routine sets the Transient state for @a the_thread. It performs
|
||||
* any necessary scheduling operations including the selection of
|
||||
@@ -734,11 +738,11 @@ void _Thread_Set_transient(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Initializes Enviroment for A Thread
|
||||
* @brief Initializes enviroment for a thread.
|
||||
*
|
||||
* This routine initializes the context of @a the_thread to its
|
||||
* appropriate starting state.
|
||||
*
|
||||
*
|
||||
* @param[in] the_thread is the pointer to the thread control block.
|
||||
*/
|
||||
void _Thread_Load_environment(
|
||||
@@ -746,7 +750,8 @@ void _Thread_Load_environment(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Handler
|
||||
* @brief Wrapper function for all threads.
|
||||
*
|
||||
* This routine is the wrapper function for all threads. It is
|
||||
* the starting point for all threads. The user provided thread
|
||||
* entry point is invoked by this routine. Operations
|
||||
@@ -761,14 +766,14 @@ void _Thread_Load_environment(
|
||||
* interrupts may already be at there proper level. Either way,
|
||||
* setting the initial isr level properly here is safe.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
* @param[in]: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
* @param[out]: NONE
|
||||
*/
|
||||
void _Thread_Handler( void );
|
||||
|
||||
/**
|
||||
* @brief Ended the delay of a Thread
|
||||
* @brief Ended the delay of a thread.
|
||||
*
|
||||
* This routine is invoked when a thread must be unblocked at the
|
||||
* end of a time based delay (i.e. wake after or wake when).
|
||||
@@ -782,7 +787,7 @@ void _Thread_Delay_ended(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Changes the priority of a thread
|
||||
* @brief Change the priority of a thread.
|
||||
*
|
||||
* This routine changes the current priority of @a the_thread to
|
||||
* @a new_priority. It performs any necessary scheduling operations
|
||||
@@ -799,7 +804,7 @@ void _Thread_Change_priority (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Set Thread Priority
|
||||
* @brief Set thread priority.
|
||||
*
|
||||
* This routine updates the priority related fields in the_thread
|
||||
* control block to indicate the current priority is now new_priority.
|
||||
@@ -840,7 +845,7 @@ void *_Thread_Idle_body(
|
||||
typedef void (*rtems_per_thread_routine)( Thread_Control * );
|
||||
|
||||
/**
|
||||
* @brief Iterates Over All Threads
|
||||
* @brief Iterates over all threads.
|
||||
* This routine iterates over all threads regardless of API and
|
||||
* invokes the specified routine.
|
||||
*/
|
||||
@@ -849,7 +854,7 @@ void rtems_iterate_over_all_threads(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Maps THread Id to a TCB Pointer
|
||||
* @brief Maps thread Id to a TCB pointer.
|
||||
*
|
||||
* This function maps thread IDs to thread control
|
||||
* blocks. If ID corresponds to a local thread, then it
|
||||
@@ -875,7 +880,7 @@ Thread_Control *_Thread_Get (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Cancel a blocking operation due to ISR
|
||||
* @brief Cancel a blocking operation due to ISR.
|
||||
*
|
||||
* This method is used to cancel a blocking operation that was
|
||||
* satisfied from an ISR while the thread executing was in the
|
||||
@@ -900,14 +905,14 @@ void _Thread_blocking_operation_Cancel(
|
||||
#if defined(RTEMS_SMP)
|
||||
|
||||
/**
|
||||
* @brief _Thread_Dispatch_initialization
|
||||
* @brief Initializes the thread dispatching subsystem.
|
||||
*
|
||||
* This routine initializes the thread dispatching subsystem.
|
||||
*/
|
||||
void _Thread_Dispatch_initialization(void);
|
||||
|
||||
/**
|
||||
* @brief _Thread_Dispatch_in_critical_section
|
||||
* @brief Checks if thread dispatch says that we are in a critical section.
|
||||
*
|
||||
* This routine returns true if thread dispatch indicates
|
||||
* that we are in a critical section.
|
||||
@@ -915,14 +920,14 @@ void _Thread_blocking_operation_Cancel(
|
||||
bool _Thread_Dispatch_in_critical_section(void);
|
||||
|
||||
/**
|
||||
* @brief _Thread_Dispatch_get_disable_level
|
||||
* @brief Returns value of the the thread dispatch level.
|
||||
*
|
||||
* This routine returns value of the the thread dispatch level.
|
||||
*/
|
||||
uint32_t _Thread_Dispatch_get_disable_level(void);
|
||||
|
||||
/**
|
||||
* @brief _Thread_Dispatch_set_disable_level
|
||||
* @brief Sets thread dispatch level to the value passed in.
|
||||
*
|
||||
* This routine sets thread dispatch level to the
|
||||
* value passed in.
|
||||
@@ -930,14 +935,14 @@ void _Thread_blocking_operation_Cancel(
|
||||
uint32_t _Thread_Dispatch_set_disable_level(uint32_t value);
|
||||
|
||||
/**
|
||||
* @brief _Thread_Dispatch_increment_disable_level
|
||||
* @brief Increments the thread dispatch level.
|
||||
*
|
||||
* This rountine increments the thread dispatch level
|
||||
*/
|
||||
uint32_t _Thread_Dispatch_increment_disable_level(void);
|
||||
|
||||
/**
|
||||
* @brief _Thread_Dispatch_decrement_disable_level
|
||||
* @brief Decrements the thread dispatch level.
|
||||
*
|
||||
* This routine decrements the thread dispatch level.
|
||||
*/
|
||||
@@ -963,4 +968,4 @@ void _Thread_blocking_operation_Cancel(
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/threadq.h
|
||||
*
|
||||
* Constants and Structures Associated with the Manipulation of Objects
|
||||
*
|
||||
* This include file contains all the constants and structures associated
|
||||
* with the manipulation of objects.
|
||||
*/
|
||||
@@ -60,7 +62,7 @@ typedef void ( *Thread_queue_Timeout_callout )(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Dequeue
|
||||
* @brief Gets a pointer to a thread waiting on the_thread_queue.
|
||||
*
|
||||
* This function returns a pointer to a thread waiting on
|
||||
* the_thread_queue. The selection of this thread is based on
|
||||
@@ -72,7 +74,7 @@ Thread_Control *_Thread_queue_Dequeue(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Enqueue Wrapper
|
||||
* @brief Enqueues the currently executing thread on the_thread_queue.
|
||||
*
|
||||
* This routine enqueues the currently executing thread on
|
||||
* the_thread_queue with an optional timeout.
|
||||
@@ -84,7 +86,7 @@ Thread_Control *_Thread_queue_Dequeue(
|
||||
_Thread_queue_Timeout )
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Enqueue
|
||||
* @brief Blocks a thread and places it on a thread.
|
||||
*
|
||||
* This routine blocks a thread, places it on a thread, and optionally
|
||||
* starts a timeout timer.
|
||||
@@ -102,7 +104,7 @@ void _Thread_queue_Enqueue_with_handler(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Requeue
|
||||
* @brief Invoked when a thread changes priority and is blocked.
|
||||
*
|
||||
* This routine is invoked when a thread changes priority and is
|
||||
* blocked on a thread queue. If the queue is priority ordered,
|
||||
@@ -119,7 +121,7 @@ void _Thread_queue_Requeue(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Extracts Thread from Thread Queue
|
||||
* @brief Extracts thread from thread queue.
|
||||
*
|
||||
* This routine removes @a the_thread from @a the_thread_queue
|
||||
* and cancels any timeouts associated with this blocking.
|
||||
@@ -133,7 +135,7 @@ void _Thread_queue_Extract(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Extract with proxy
|
||||
* @brief Extracts the_thread from the_thread_queue.
|
||||
*
|
||||
* This routine extracts the_thread from the_thread_queue
|
||||
* and ensures that if there is a proxy for this task on
|
||||
@@ -144,7 +146,7 @@ bool _Thread_queue_Extract_with_proxy(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue First
|
||||
* @brief Gets a pointer to the "first" thread on the_thread_queue.
|
||||
*
|
||||
* This function returns a pointer to the "first" thread
|
||||
* on the_thread_queue. The "first" thread is selected
|
||||
@@ -152,14 +154,14 @@ bool _Thread_queue_Extract_with_proxy(
|
||||
*
|
||||
* @param[in] the_thread_queue pointer to thread queue
|
||||
*
|
||||
* @return first thread or NULL
|
||||
* @retval first thread or NULL
|
||||
*/
|
||||
Thread_Control *_Thread_queue_First(
|
||||
Thread_queue_Control *the_thread_queue
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Flush
|
||||
* @brief Unblocks all threads blocked on the_thread_queue.
|
||||
*
|
||||
* This routine unblocks all threads blocked on the_thread_queue
|
||||
* and cancels any associated timeouts.
|
||||
@@ -171,7 +173,7 @@ void _Thread_queue_Flush(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Initialize
|
||||
* @brief Initialize the_thread_queue.
|
||||
*
|
||||
* This routine initializes the_thread_queue based on the
|
||||
* discipline indicated in attribute_set. The state set on
|
||||
@@ -190,7 +192,8 @@ void _Thread_queue_Initialize(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Dequeue priority
|
||||
* @brief Removes a thread from the specified PRIORITY based
|
||||
* threadq, unblocks it, and cancels its timeout timer.
|
||||
*
|
||||
* This routine removes a thread from the specified PRIORITY based
|
||||
* threadq, unblocks it, and cancels its timeout timer.
|
||||
@@ -208,7 +211,7 @@ Thread_Control *_Thread_queue_Dequeue_priority(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Enqueue Priority
|
||||
* @brief Enqueues the currently executing thread on the_thread_queue.
|
||||
*
|
||||
* This routine enqueues the currently executing thread on
|
||||
* the_thread_queue with an optional timeout using the
|
||||
@@ -228,7 +231,7 @@ Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Extract priority Helper
|
||||
* @brief Removes the_thread and cancels related timeouts.
|
||||
*
|
||||
* This routine removes the_thread from the_thread_queue
|
||||
* and cancels any timeouts associated with this blocking.
|
||||
@@ -246,7 +249,7 @@ void _Thread_queue_Extract_priority_helper(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Extract priority
|
||||
* @brief Wraps the underlying call and hides the requeuing argument.
|
||||
*
|
||||
* This macro wraps the underlying call and hides the requeuing argument.
|
||||
*/
|
||||
@@ -254,21 +257,21 @@ void _Thread_queue_Extract_priority_helper(
|
||||
#define _Thread_queue_Extract_priority( _the_thread_queue, _the_thread ) \
|
||||
_Thread_queue_Extract_priority_helper( _the_thread_queue, _the_thread, false )
|
||||
/**
|
||||
* @brief Returns highest priority thread on the_thread_queue
|
||||
* @brief Get highest priority thread on the_thread_queue.
|
||||
*
|
||||
* This function returns a pointer to the "first" thread
|
||||
* on @a the_thread_queue. The "first" thread is the highest
|
||||
* priority thread waiting on @a the_thread_queue.
|
||||
*
|
||||
* @param[in] the_thread_queue is the pointer to the thread queue
|
||||
* @return first thread or NULL
|
||||
* @retval first thread or NULL
|
||||
*/
|
||||
Thread_Control *_Thread_queue_First_priority(
|
||||
Thread_queue_Control *the_thread_queue
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Dequeue FIFO
|
||||
* @brief Gets a pointer to the thread which has been waiting the longest.
|
||||
*
|
||||
* This function returns a pointer to the thread which has
|
||||
* been waiting the longest on the_thread_queue. If no
|
||||
@@ -276,7 +279,7 @@ Thread_Control *_Thread_queue_First_priority(
|
||||
*
|
||||
* @param[in] the_thread_queue is the pointer to threadq
|
||||
*
|
||||
* @return thread dequeued or NULL
|
||||
* @retval thread dequeued or NULL
|
||||
*
|
||||
* - INTERRUPT LATENCY:
|
||||
* + check sync
|
||||
@@ -287,7 +290,7 @@ Thread_Control *_Thread_queue_Dequeue_fifo(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Enqueue FIFO
|
||||
* @brief Enqueues the currently executing thread on the_thread_queue.
|
||||
*
|
||||
* This routine enqueues the currently executing thread on
|
||||
* the_thread_queue with an optional timeout using the
|
||||
@@ -307,7 +310,7 @@ Thread_blocking_operation_States _Thread_queue_Enqueue_fifo (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Extract FIFO
|
||||
* @brief Removes the_thread from the_thread_queue and cancels any timeouts.
|
||||
*
|
||||
* This routine removes the_thread from the_thread_queue
|
||||
* and cancels any timeouts associated with this blocking.
|
||||
@@ -318,7 +321,7 @@ void _Thread_queue_Extract_fifo(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue First FIFO
|
||||
* @brief Gets a pointer to the "first" thread on the_thread_queue.
|
||||
*
|
||||
* This function returns a pointer to the "first" thread
|
||||
* on the_thread_queue. The first thread is the thread
|
||||
@@ -326,14 +329,14 @@ void _Thread_queue_Extract_fifo(
|
||||
*
|
||||
* @param[in] the_thread_queue is the pointer to threadq
|
||||
*
|
||||
* @return first thread or NULL
|
||||
* @retval first thread or NULL
|
||||
*/
|
||||
Thread_Control *_Thread_queue_First_fifo(
|
||||
Thread_queue_Control *the_thread_queue
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Thread Queue Timeout
|
||||
* @brief Thread queue timeout.
|
||||
*
|
||||
* This routine is invoked when a task's request has not
|
||||
* been satisfied after the timeout interval specified to
|
||||
@@ -349,7 +352,7 @@ void _Thread_queue_Timeout (
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Process Thread Queue Timeout
|
||||
* @brief Process thread queue timeout.
|
||||
*
|
||||
* This is a shared helper routine which makes it easier to have multiple
|
||||
* object class specific timeout routines.
|
||||
@@ -375,4 +378,4 @@ void _Thread_queue_Process_timeout(
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/timestamp.h
|
||||
*
|
||||
* @brief Helpers for Manipulating Timestamps
|
||||
*
|
||||
* This include file contains helpers for manipulating timestamps.
|
||||
*/
|
||||
|
||||
@@ -73,7 +75,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set Timestamp to Specified Seconds and Nanoseconds
|
||||
* @brief Set timestamp to specified seconds and nanoseconds.
|
||||
*
|
||||
* This method sets the timestamp to the specified @a _seconds and @a _nanoseconds
|
||||
* value.
|
||||
@@ -91,7 +93,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Zero Timestamp
|
||||
* @brief Sets the timestamp to zero.
|
||||
*
|
||||
* This method sets the timestamp to zero.
|
||||
* value.
|
||||
@@ -107,13 +109,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Is Timestamp Valid
|
||||
* @brief Determines the validity of a timestamp.
|
||||
*
|
||||
* This method determines the validity of a timestamp.
|
||||
*
|
||||
* @param[in] _time points to the timestamp instance to validate.
|
||||
*
|
||||
* @return This method returns true if @a time is valid and
|
||||
* @retval This method returns true if @a time is valid and
|
||||
* false otherwise.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
@@ -125,14 +127,14 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Timestamp Less Than Operator
|
||||
* @brief Less than operator for timestamps.
|
||||
*
|
||||
* This method is the less than operator for timestamps.
|
||||
*
|
||||
* @param[in] _lhs points to the left hand side timestamp
|
||||
* @param[in] _rhs points to the right hand side timestamp
|
||||
*
|
||||
* @return This method returns true if @a _lhs is less than the @a _rhs and
|
||||
* @retval This method returns true if @a _lhs is less than the @a _rhs and
|
||||
* false otherwise.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
@@ -144,28 +146,28 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Timestamp Greater Than Operator
|
||||
* @brief Greater than operator for timestamps.
|
||||
*
|
||||
* This method is the greater than operator for timestamps.
|
||||
*
|
||||
* @param[in] _lhs points to the left hand side timestamp
|
||||
* @param[in] _rhs points to the right hand side timestamp
|
||||
*
|
||||
* @return This method returns true if @a _lhs is greater than the @a _rhs and
|
||||
* @retval This method returns true if @a _lhs is greater than the @a _rhs and
|
||||
* false otherwise.
|
||||
*/
|
||||
#define _Timestamp_Greater_than( _lhs, _rhs ) \
|
||||
_Timestamp_Less_than( _rhs, _lhs )
|
||||
|
||||
/**
|
||||
* @brief Timestamp equal to Operator
|
||||
* @brief Equal to than operator for timestamps.
|
||||
*
|
||||
* This method is the is equal to than operator for timestamps.
|
||||
*
|
||||
* @param[in] _lhs points to the left hand side timestamp
|
||||
* @param[in] _rhs points to the right hand side timestamp
|
||||
*
|
||||
* @return This method returns true if @a _lhs is equal to @a _rhs and
|
||||
* @retval This method returns true if @a _lhs is equal to @a _rhs and
|
||||
* false otherwise.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
@@ -177,7 +179,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Add to a Timestamp
|
||||
* @brief Adds two timestamps.
|
||||
*
|
||||
* This routine adds two timestamps. The second argument is added
|
||||
* to the first.
|
||||
@@ -185,7 +187,7 @@ extern "C" {
|
||||
* @param[in] _time points to the base time to be added to
|
||||
* @param[in] _add points to the timestamp to add to the first argument
|
||||
*
|
||||
* @return This method returns the number of seconds @a time increased by.
|
||||
* @retval This method returns the number of seconds @a time increased by.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
#define _Timestamp_Add_to( _time, _add ) \
|
||||
@@ -196,14 +198,14 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Convert Timestamp to Number of Ticks
|
||||
* @brief Convert timestamp to number of clock ticks.
|
||||
*
|
||||
* This routine convert the @a time timestamp to the corresponding number
|
||||
* of clock ticks.
|
||||
*
|
||||
* @param[in] _time points to the time to be converted
|
||||
*
|
||||
* @return This method returns the number of ticks computed.
|
||||
* @retval This method returns the number of ticks computed.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
#define _Timestamp_To_ticks( _time ) \
|
||||
@@ -214,7 +216,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Convert Ticks to Timestamp
|
||||
* @brief Converts the @a _ticks value to timestamp format.
|
||||
*
|
||||
* This routine converts the @a _ticks value to the corresponding
|
||||
* timestamp format @a _time.
|
||||
@@ -231,7 +233,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Subtract Two Timestamp
|
||||
* @brief Subtracts two timestamps.
|
||||
*
|
||||
* This routine subtracts two timestamps. @a result is set to
|
||||
* @a end - @a start.
|
||||
@@ -241,7 +243,7 @@ extern "C" {
|
||||
* @param[in] _result points to the difference between
|
||||
* starting and ending time.
|
||||
*
|
||||
* @return This method fills in @a _result.
|
||||
* @retval This method fills in @a _result.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
#define _Timestamp_Subtract( _start, _end, _result ) \
|
||||
@@ -252,7 +254,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Divide Timestamp By Integer
|
||||
* @brief Divides a timestamp by an integer value.
|
||||
*
|
||||
* This routine divides a timestamp by an integer value. The expected
|
||||
* use is to assist in benchmark calculations where you typically
|
||||
@@ -262,7 +264,7 @@ extern "C" {
|
||||
* @param[in] _iterations is the number of iterations
|
||||
* @param[in] _result points to the average time.
|
||||
*
|
||||
* @return This method fills in @a result.
|
||||
* @retval This method fills in @a result.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
#define _Timestamp_Divide_by_integer( _time, _iterations, _result ) \
|
||||
@@ -273,7 +275,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Divide Timestamp
|
||||
* @brief Divides a timestamp by another timestamp.
|
||||
*
|
||||
* This routine divides a timestamp by another timestamp. The
|
||||
* intended use is for calculating percentages to three decimal points.
|
||||
@@ -283,7 +285,7 @@ extern "C" {
|
||||
* @param[in] _ival_percentage points to the integer portion of the average
|
||||
* @param[in] _fval_percentage points to the thousandths of percentage
|
||||
*
|
||||
* @return This method fills in @a result.
|
||||
* @retval This method fills in @a result.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
#define _Timestamp_Divide( _lhs, _rhs, _ival_percentage, _fval_percentage ) \
|
||||
@@ -294,13 +296,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get Seconds Portion of Timestamp
|
||||
* @brief Get seconds portion of timestamp.
|
||||
*
|
||||
* This method returns the seconds portion of the specified timestamp
|
||||
*
|
||||
* @param[in] _time points to the timestamp
|
||||
*
|
||||
* @return The seconds portion of @a _time.
|
||||
* @retval The seconds portion of @a _time.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
#define _Timestamp_Get_seconds( _time ) \
|
||||
@@ -311,13 +313,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get Nanoseconds Portion of Timestamp
|
||||
* @brief Get nanoseconds portion of timestamp.
|
||||
*
|
||||
* This method returns the nanoseconds portion of the specified timestamp
|
||||
*
|
||||
* @param[in] _time points to the timestamp
|
||||
*
|
||||
* @return The nanoseconds portion of @a _time.
|
||||
* @retval The nanoseconds portion of @a _time.
|
||||
*/
|
||||
#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE
|
||||
#define _Timestamp_Get_nanoseconds( _time ) \
|
||||
@@ -328,7 +330,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Convert Timestamp to Struct Timespec
|
||||
* @brief Convert timestamp to struct timespec.
|
||||
*
|
||||
* This method returns the seconds portion of the specified @a _timestamp.
|
||||
*
|
||||
@@ -345,7 +347,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Convert Timestamp to struct timeval
|
||||
* @brief Convert timestamp to struct timeval.
|
||||
*
|
||||
* @param[in] _timestamp points to the timestamp
|
||||
* @param[in] _timeval points to the timeval
|
||||
@@ -368,4 +370,4 @@ extern "C" {
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file rtems/score/tod.h
|
||||
*
|
||||
* @brief Constants and Structures Associated with the Time of Day Handler.
|
||||
*
|
||||
* This include file contains all the constants and structures associated
|
||||
* with the Time of Day Handler.
|
||||
*/
|
||||
@@ -105,7 +107,7 @@ extern "C" {
|
||||
(4 * TOD_SECONDS_PER_DAY))
|
||||
|
||||
/**
|
||||
* @brief RTEMS Epoch Year
|
||||
* @brief Earliest year to which an time of day can be initialized.
|
||||
*
|
||||
* The following constant define the earliest year to which an
|
||||
* time of day can be initialized. This is considered the
|
||||
@@ -157,7 +159,7 @@ typedef struct {
|
||||
SCORE_EXTERN TOD_Control _TOD;
|
||||
|
||||
/**
|
||||
* @brief Seconds Since RTEMS Epoch
|
||||
* @brief Number of seconds Since RTEMS epoch.
|
||||
*
|
||||
* The following contains the number of seconds from 00:00:00
|
||||
* January 1, TOD_BASE_YEAR until the current time of day.
|
||||
@@ -166,14 +168,14 @@ SCORE_EXTERN TOD_Control _TOD;
|
||||
_Timestamp_Get_seconds(&_TOD.now)
|
||||
|
||||
/**
|
||||
* @brief Initializes the Time of Day Handler
|
||||
* @brief Initializes the time of day handler.
|
||||
*
|
||||
* Performs the initialization necessary for the Time Of Day handler.
|
||||
*/
|
||||
void _TOD_Handler_initialization(void);
|
||||
|
||||
/**
|
||||
* @brief Sets the time of day from timestamp
|
||||
* @brief Sets the time of day from timestamp.
|
||||
*
|
||||
* The @a tod_as_timestamp timestamp represents the time since UNIX epoch.
|
||||
* The watchdog seconds chain will be adjusted.
|
||||
@@ -206,7 +208,7 @@ static inline void _TOD_Set(
|
||||
* @param[out] snapshot The snapshot.
|
||||
* @param[in] source The clock.
|
||||
*
|
||||
* @return The snapshot.
|
||||
* @retval The snapshot.
|
||||
*/
|
||||
Timestamp_Control *_TOD_Get_with_nanoseconds(
|
||||
Timestamp_Control *snapshot,
|
||||
@@ -226,7 +228,7 @@ static inline void _TOD_Get(
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief _TOD_Get_uptime
|
||||
* @brief Gets the system uptime with potential accuracy to the nanosecond.
|
||||
*
|
||||
* This routine returns the system uptime with potential accuracy
|
||||
* to the nanosecond.
|
||||
@@ -241,7 +243,7 @@ static inline void _TOD_Get_uptime(
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief _TOD_Get_uptime_as_timespec
|
||||
* @brief Gets the system uptime with potential accuracy to the nanosecond.
|
||||
*
|
||||
* This routine returns the system uptime with potential accuracy
|
||||
* to the nanosecond.
|
||||
@@ -253,7 +255,7 @@ void _TOD_Get_uptime_as_timespec(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Increments time of day at each clock tick
|
||||
* @brief Increments time of day at each clock tick.
|
||||
*
|
||||
* This routine increments the ticks field of the current time of
|
||||
* day at each clock tick.
|
||||
@@ -261,7 +263,7 @@ void _TOD_Get_uptime_as_timespec(
|
||||
void _TOD_Tickle_ticks( void );
|
||||
|
||||
/**
|
||||
* @brief TOD_MILLISECONDS_TO_MICROSECONDS
|
||||
* @brief Converts an interval expressed in milliseconds to microseconds.
|
||||
*
|
||||
* This routine converts an interval expressed in milliseconds to microseconds.
|
||||
*
|
||||
@@ -270,7 +272,7 @@ void _TOD_Tickle_ticks( void );
|
||||
#define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((uint32_t)(_ms) * 1000L)
|
||||
|
||||
/**
|
||||
* @brief Converts microseconds to ticks
|
||||
* @brief Converts an interval expressed in microseconds to ticks.
|
||||
*
|
||||
* This routine converts an interval expressed in microseconds to ticks.
|
||||
*
|
||||
@@ -281,7 +283,7 @@ uint32_t TOD_MICROSECONDS_TO_TICKS(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief TOD_MILLISECONDS_TO_TICKS
|
||||
* @brief Converts an interval expressed in milliseconds to ticks.
|
||||
*
|
||||
* This routine converts an interval expressed in milliseconds to ticks.
|
||||
*
|
||||
@@ -292,7 +294,7 @@ uint32_t TOD_MILLISECONDS_TO_TICKS(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief How many ticks in a second?
|
||||
* @brief Gets number of ticks in a second.
|
||||
*
|
||||
* This method returns the number of ticks in a second.
|
||||
*
|
||||
@@ -302,7 +304,7 @@ uint32_t TOD_MILLISECONDS_TO_TICKS(
|
||||
uint32_t TOD_TICKS_PER_SECOND_method(void);
|
||||
|
||||
/**
|
||||
* @brief Method to return number of ticks in a second
|
||||
* @brief Gets number of ticks in a second.
|
||||
*
|
||||
* This method exists to hide the fact that TOD_TICKS_PER_SECOND can not
|
||||
* be implemented as a macro in a .h file due to visibility issues.
|
||||
@@ -322,4 +324,4 @@ uint32_t TOD_TICKS_PER_SECOND_method(void);
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* @ingroup ScoreUserExt
|
||||
*
|
||||
* @brief User Extension Handler API.
|
||||
* @brief User Extension Handler API
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* @ingroup ScoreUserExt
|
||||
*
|
||||
* @brief User Extension Handler API.
|
||||
* @brief User Extension Handler API
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -25,6 +25,10 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup ScoreUserExt User Extension Handler
|
||||
*
|
||||
* @ingroup Score
|
||||
*
|
||||
* @addtogroup ScoreUserExt
|
||||
*
|
||||
* @{
|
||||
@@ -246,4 +250,4 @@ static inline void _User_extensions_Fatal(
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
/* end of include file */
|
||||
Reference in New Issue
Block a user