Go to the documentation of this file.
40 #if (CH_CFG_USE_DELEGATES == TRUE) || defined(__DOXYGEN__)
129 return fn3(p1, p2, p3);
144 return fn4(p1, p2, p3, p4);
163 va_start(args, veneer);
192 const call_message_t *cmp;
196 cmp = (
const call_message_t *)
chMsgGet(tp);
197 ret = cmp->veneer(cmp->argsp);
221 const call_message_t *cmp;
229 cmp = (
const call_message_t *)
chMsgGet(tp);
230 ret = cmp->veneer(cmp->argsp);
#define chMsgGet(tp)
Returns the message carried by the specified thread.
void chDelegateDispatch(void)
Call messages dispatching.
msg_t __ch_delegate_fn0(va_list *argsp)
Veneer for functions with no parameters.
msg_t __ch_delegate_fn4(va_list *argsp)
Veneer for functions with four parameters.
msg_t(* delegate_fn3_t)(msg_t p1, msg_t p2, msg_t p3)
Type of a delegate function with three parameters.
msg_t __ch_delegate_fn1(va_list *argsp)
Veneer for functions with one parameter.
thread_t * chMsgWait(void)
Suspends the thread and waits for an incoming message.
msg_t(* delegate_fn4_t)(msg_t p1, msg_t p2, msg_t p3, msg_t p4)
Type of a delegate function with four parameters.
msg_t chDelegateDispatchTimeout(sysinterval_t timeout)
Call messages dispatching with timeout.
Structure representing a thread.
msg_t __ch_delegate_fn2(va_list *argsp)
Veneer for functions with two parameters.
msg_t chMsgSend(thread_t *tp, msg_t msg)
Sends a message to the specified thread.
msg_t(* delegate_fn0_t)(void)
Type of a delegate function with no parameters.
msg_t(* delegate_fn2_t)(msg_t p1, msg_t p2)
Type of a delegate function with two parameters.
msg_t chDelegateCallVeneer(thread_t *tp, delegate_veneer_t veneer,...)
Triggers a function call on a delegate thread.
#define MSG_OK
Normal wakeup message.
void chMsgRelease(thread_t *tp, msg_t msg)
Releases a sender thread specifying a response message.
uint64_t sysinterval_t
Type of time interval.
msg_t(* delegate_veneer_t)(va_list *argsp)
Type of a delegate veneer function.
#define MSG_TIMEOUT
Wakeup caused by a timeout condition.
msg_t(* delegate_fn1_t)(msg_t p1)
Type of a delegate function with one parameter.
msg_t __ch_delegate_fn3(va_list *argsp)
Veneer for functions with three parameters.
thread_t * chMsgWaitTimeout(sysinterval_t timeout)
Suspends the thread and waits for an incoming message or a timeout to occur.