|
ChibiOS/RT 7.0.5
|
Threads module macros and structures. More...
Go to the source code of this file.
Data Structures | |
| struct | thread_descriptor_t |
| Type of a thread descriptor. More... | |
Macros | |
Threads queues | |
| #define | __THREADS_QUEUE_DATA(name) |
| Data part of a static threads queue object initializer. | |
| #define | THREADS_QUEUE_DECL(name) |
| Static threads queue object initializer. | |
Working Areas | |
| #define | THD_WORKING_AREA_SIZE(n) |
| Calculates the total Working Area size. | |
| #define | THD_WORKING_AREA(s, n) |
| Static working area allocation. | |
| #define | THD_WORKING_AREA_BASE(s) |
| Base of a working area casted to the correct type. | |
| #define | THD_WORKING_AREA_END(s) |
| End of a working area casted to the correct type. | |
Threads abstraction macros | |
| #define | THD_FUNCTION(tname, arg) |
| Thread declaration macro. | |
Threads initializers | |
| #define | THD_DESCRIPTOR(name, wbase, wend, prio, funcp, arg) |
| Thread descriptor initializer with no affinity. | |
| #define | THD_DESCRIPTOR_AFFINITY(name, wbase, wend, prio, funcp, arg, oip) |
| Thread descriptor initializer with no affinity. | |
Macro Functions | |
| #define | chThdSleepSeconds(sec) |
| Delays the invoking thread for the specified number of seconds. | |
| #define | chThdSleepMilliseconds(msec) |
| Delays the invoking thread for the specified number of milliseconds. | |
| #define | chThdSleepMicroseconds(usec) |
| Delays the invoking thread for the specified number of microseconds. | |
Typedefs | |
| typedef void(* | tfunc_t) (void *p) |
| Thread function. | |
Functions | |
| thread_t * | __thd_object_init (os_instance_t *oip, thread_t *tp, const char *name, tprio_t prio) |
| Initializes a thread structure. | |
| void | __thd_stackfill (uint8_t *startp, uint8_t *endp) |
| Stack fill utility. | |
| thread_t * | chThdCreateSuspendedI (const thread_descriptor_t *tdp) |
| Creates a new thread. | |
| thread_t * | chThdCreateSuspended (const thread_descriptor_t *tdp) |
| Creates a new thread. | |
| thread_t * | chThdCreateI (const thread_descriptor_t *tdp) |
| Creates a new thread. | |
| thread_t * | chThdCreate (const thread_descriptor_t *tdp) |
| Creates a new thread. | |
| thread_t * | chThdCreateStatic (void *wsp, size_t size, tprio_t prio, tfunc_t pf, void *arg) |
| Creates a new thread. | |
| thread_t * | chThdStart (thread_t *tp) |
Starts a thread created with chThdCreateSuspended(). | |
| thread_t * | chThdAddRef (thread_t *tp) |
| Adds a reference to a thread object. | |
| void | chThdRelease (thread_t *tp) |
| Releases a reference to a thread object. | |
| void | chThdExit (msg_t msg) |
| Terminates the current thread. | |
| void | chThdExitS (msg_t msg) |
| Terminates the current thread. | |
| msg_t | chThdWait (thread_t *tp) |
| Blocks the execution of the invoking thread until the specified thread terminates then the exit code is returned. | |
| tprio_t | chThdSetPriority (tprio_t newprio) |
| Changes the running thread priority level then reschedules if necessary. | |
| void | chThdTerminate (thread_t *tp) |
| Requests a thread termination. | |
| msg_t | chThdSuspendS (thread_reference_t *trp) |
| Sends the current thread sleeping and sets a reference variable. | |
| msg_t | chThdSuspendTimeoutS (thread_reference_t *trp, sysinterval_t timeout) |
| Sends the current thread sleeping and sets a reference variable. | |
| void | chThdResumeI (thread_reference_t *trp, msg_t msg) |
| Wakes up a thread waiting on a thread reference object. | |
| void | chThdResumeS (thread_reference_t *trp, msg_t msg) |
| Wakes up a thread waiting on a thread reference object. | |
| void | chThdResume (thread_reference_t *trp, msg_t msg) |
| Wakes up a thread waiting on a thread reference object. | |
| msg_t | chThdEnqueueTimeoutS (threads_queue_t *tqp, sysinterval_t timeout) |
| Enqueues the caller thread on a threads queue object. | |
| void | chThdDequeueNextI (threads_queue_t *tqp, msg_t msg) |
| Dequeues and wakes up one thread from the threads queue object, if any. | |
| void | chThdDequeueAllI (threads_queue_t *tqp, msg_t msg) |
| Dequeues and wakes up all threads from the threads queue object. | |
| void | chThdSleep (sysinterval_t time) |
| Suspends the invoking thread for the specified time. | |
| void | chThdSleepUntil (systime_t time) |
| Suspends the invoking thread until the system time arrives to the specified value. | |
| systime_t | chThdSleepUntilWindowed (systime_t prev, systime_t next) |
| Suspends the invoking thread until the system time arrives to the specified value. | |
| void | chThdYield (void) |
| Yields the time slot. | |
| static thread_t * | chThdGetSelfX (void) |
Returns a pointer to the current thread_t. | |
| static tprio_t | chThdGetPriorityX (void) |
| Returns the current thread priority. | |
| static systime_t | chThdGetTicksX (thread_t *tp) |
| Returns the number of ticks consumed by the specified thread. | |
| static stkalign_t * | chThdGetWorkingAreaX (thread_t *tp) |
| Returns the working area base of the specified thread. | |
| static bool | chThdTerminatedX (thread_t *tp) |
Verifies if the specified thread is in the CH_STATE_FINAL state. | |
| static bool | chThdShouldTerminateX (void) |
| Verifies if the current thread has a termination request pending. | |
| static thread_t * | chThdStartI (thread_t *tp) |
Resumes a thread created with chThdCreateI(). | |
| static void | chThdSleepS (sysinterval_t ticks) |
| Suspends the invoking thread for the specified number of ticks. | |
| static void | chThdQueueObjectInit (threads_queue_t *tqp) |
| Initializes a threads queue object. | |
| static bool | chThdQueueIsEmptyI (threads_queue_t *tqp) |
Evaluates to true if the specified queue is empty. | |
| static void | chThdDoDequeueNextI (threads_queue_t *tqp, msg_t msg) |
| Dequeues and wakes up one thread from the threads queue object. | |
Threads module macros and structures.
Definition in file chthreads.h.