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