48#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
ChibiOS/RT main include file.
#define chDbgAssert(c, r)
Condition assertion.
#define chDbgCheck(c)
Function parameters check.
#define chDbgCheckClassS()
thread_t * chMsgWaitTimeoutS(sysinterval_t timeout)
Suspends the thread and waits for an incoming message or a timeout to occur.
static void chMsgReleaseS(thread_t *tp, msg_t msg)
Releases the thread waiting on top of the messages queue.
msg_t chMsgSend(thread_t *tp, msg_t msg)
Sends a message to the specified thread.
thread_t * chMsgWaitS(void)
Suspends the thread and waits for an incoming message.
thread_t * chMsgPollS(void)
Poll to check for an incoming message.
static bool chMsgIsPendingI(thread_t *tp)
Evaluates to true if the thread has pending messages.
void chMsgRelease(thread_t *tp, msg_t msg)
Releases a sender thread specifying a response message.
#define __ch_msg_insert(qp, tp)
static ch_queue_t * ch_queue_fifo_remove(ch_queue_t *qp)
Removes the first-out element from a queue and returns it.
#define threadref(p)
Safe cast of a queue pointer to a thread pointer.
struct ch_thread thread_t
Type of a thread structure.
#define CH_STATE_WTMSG
Waiting for a message.
#define MSG_OK
Normal wakeup message.
thread_t * chSchReadyI(thread_t *tp)
Inserts a thread in the Ready List placing it behind its peers.
void chSchGoSleepS(tstate_t newstate)
Puts the current thread to sleep into the specified state.
#define CH_STATE_SNDMSG
Sent a message, waiting answer.
#define CH_STATE_SNDMSGQ
Sending a message, in queue.
msg_t chSchGoSleepTimeoutS(tstate_t newstate, sysinterval_t timeout)
Puts the current thread to sleep into the specified state with timeout specification.
static void chSysLock(void)
Enters the kernel lock state.
static void chSysUnlock(void)
Leaves the kernel lock state.
static thread_t * chThdGetSelfX(void)
Returns a pointer to the current thread_t.
uint64_t sysinterval_t
Type of time interval.
msg_t rdymsg
Thread wakeup code.
msg_t sentmsg
Thread sent message.
tstate_t state
Current thread state.
ch_queue_t msgqueue
Messages queue.
union ch_thread::@250330312022121344252011223135034045240103044261 u
State-specific fields.