ChibiOS
21.6.0
|
Typedefs | |
typedef msg_t(* | delegate_veneer_t) (va_list *argsp) |
Type of a delegate veneer function. More... | |
typedef msg_t(* | delegate_fn0_t) (void) |
Type of a delegate function with no parameters. More... | |
typedef msg_t(* | delegate_fn1_t) (msg_t p1) |
Type of a delegate function with one parameter. More... | |
typedef msg_t(* | delegate_fn2_t) (msg_t p1, msg_t p2) |
Type of a delegate function with two parameters. More... | |
typedef msg_t(* | delegate_fn3_t) (msg_t p1, msg_t p2, msg_t p3) |
Type of a delegate function with three parameters. More... | |
typedef 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. More... | |
Functions | |
msg_t | __ch_delegate_fn0 (va_list *argsp) |
Veneer for functions with no parameters. More... | |
msg_t | __ch_delegate_fn1 (va_list *argsp) |
Veneer for functions with one parameter. More... | |
msg_t | __ch_delegate_fn2 (va_list *argsp) |
Veneer for functions with two parameters. More... | |
msg_t | __ch_delegate_fn3 (va_list *argsp) |
Veneer for functions with three parameters. More... | |
msg_t | __ch_delegate_fn4 (va_list *argsp) |
Veneer for functions with four parameters. More... | |
msg_t | chDelegateCallVeneer (thread_t *tp, delegate_veneer_t veneer,...) |
Triggers a function call on a delegate thread. More... | |
void | chDelegateDispatch (void) |
Call messages dispatching. More... | |
msg_t | chDelegateDispatchTimeout (sysinterval_t timeout) |
Call messages dispatching with timeout. More... | |
static msg_t | chDelegateCallDirect0 (thread_t *tp, delegate_fn0_t func) |
Direct call to a function with no parameters. More... | |
static msg_t | chDelegateCallDirect1 (thread_t *tp, delegate_fn1_t func, msg_t p1) |
Direct call to a function with one parameter. More... | |
static msg_t | chDelegateCallDirect2 (thread_t *tp, delegate_fn2_t func, msg_t p1, msg_t p2) |
Direct call to a function with two parameters. More... | |
static msg_t | chDelegateCallDirect3 (thread_t *tp, delegate_fn3_t func, msg_t p1, msg_t p2, msg_t p3) |
Direct call to a function with three parameters. More... | |
static msg_t | chDelegateCallDirect4 (thread_t *tp, delegate_fn4_t func, msg_t p1, msg_t p2, msg_t p3, msg_t p4) |
Direct call to a function with four parameters. More... | |
typedef msg_t(* delegate_veneer_t) (va_list *argsp) |
Type of a delegate veneer function.
Definition at line 60 of file chdelegates.h.
typedef msg_t(* delegate_fn0_t) (void) |
Type of a delegate function with no parameters.
Definition at line 65 of file chdelegates.h.
Type of a delegate function with one parameter.
Definition at line 70 of file chdelegates.h.
Type of a delegate function with two parameters.
Definition at line 75 of file chdelegates.h.
Type of a delegate function with three parameters.
Definition at line 80 of file chdelegates.h.
Type of a delegate function with four parameters.
Definition at line 85 of file chdelegates.h.
msg_t __ch_delegate_fn0 | ( | va_list * | argsp | ) |
Veneer for functions with no parameters.
[in] | argsp | the list of arguments |
Definition at line 88 of file chdelegates.c.
Referenced by chDelegateCallDirect0().
msg_t __ch_delegate_fn1 | ( | va_list * | argsp | ) |
Veneer for functions with one parameter.
[in] | argsp | the list of arguments |
Definition at line 99 of file chdelegates.c.
Referenced by chDelegateCallDirect1().
msg_t __ch_delegate_fn2 | ( | va_list * | argsp | ) |
Veneer for functions with two parameters.
[in] | argsp | the list of arguments |
Definition at line 111 of file chdelegates.c.
Referenced by chDelegateCallDirect2().
msg_t __ch_delegate_fn3 | ( | va_list * | argsp | ) |
Veneer for functions with three parameters.
[in] | argsp | the list of arguments |
Definition at line 124 of file chdelegates.c.
Referenced by chDelegateCallDirect3().
msg_t __ch_delegate_fn4 | ( | va_list * | argsp | ) |
Veneer for functions with four parameters.
[in] | argsp | the list of arguments |
Definition at line 138 of file chdelegates.c.
Referenced by chDelegateCallDirect4().
msg_t chDelegateCallVeneer | ( | thread_t * | tp, |
delegate_veneer_t | veneer, | ||
... | |||
) |
Triggers a function call on a delegate thread.
chDelegateDispatchTimeout()
in order to have the functions called.[in] | tp | pointer to the delegate thread |
[in] | veneer | pointer to the veneer function to be called |
[in] | ... | variable number of parameters |
void
. Definition at line 158 of file chdelegates.c.
References chMsgSend().
Referenced by chDelegateCallDirect0(), chDelegateCallDirect1(), chDelegateCallDirect2(), chDelegateCallDirect3(), and chDelegateCallDirect4().
void chDelegateDispatch | ( | void | ) |
Call messages dispatching.
The function awaits for an incoming call messages and calls the specified functions, then it returns. In case multiple threads are sending messages then the requests are served in priority order.
Definition at line 190 of file chdelegates.c.
References chMsgGet, chMsgRelease(), and chMsgWait().
msg_t chDelegateDispatchTimeout | ( | sysinterval_t | timeout | ) |
Call messages dispatching with timeout.
The function awaits for an incoming call messages and calls the specified functions, then it returns. In case multiple threads are sending messages then the requests are served in priority order.
[in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
MSG_OK | if a function has been called. |
MSG_TIMEOUT | if a timeout occurred. |
Definition at line 219 of file chdelegates.c.
References chMsgGet, chMsgRelease(), chMsgWaitTimeout(), MSG_OK, and MSG_TIMEOUT.
|
inlinestatic |
Direct call to a function with no parameters.
chDelegateCallVeneer()
instead.[in] | tp | pointer to the delegate thread |
[in] | func | pointer to the function to be called |
msg_t
. Definition at line 124 of file chdelegates.h.
References __ch_delegate_fn0(), and chDelegateCallVeneer().
|
inlinestatic |
Direct call to a function with one parameter.
chDelegateCallVeneer()
instead.[in] | tp | pointer to the delegate thread |
[in] | func | pointer to the function to be called |
[in] | p1 | parameter 1 passed as a msg_t |
msg_t
. Definition at line 140 of file chdelegates.h.
References __ch_delegate_fn1(), and chDelegateCallVeneer().
|
inlinestatic |
Direct call to a function with two parameters.
chDelegateCallVeneer()
instead.[in] | tp | pointer to the delegate thread |
[in] | func | pointer to the function to be called |
[in] | p1 | parameter 1 passed as a msg_t |
[in] | p2 | parameter 2 passed as a msg_t |
msg_t
. Definition at line 158 of file chdelegates.h.
References __ch_delegate_fn2(), and chDelegateCallVeneer().
|
inlinestatic |
Direct call to a function with three parameters.
chDelegateCallVeneer()
instead.[in] | tp | pointer to the delegate thread |
[in] | func | pointer to the function to be called |
[in] | p1 | parameter 1 passed as a msg_t |
[in] | p2 | parameter 2 passed as a msg_t |
[in] | p3 | parameter 3 passed as a msg_t |
msg_t
. Definition at line 177 of file chdelegates.h.
References __ch_delegate_fn3(), and chDelegateCallVeneer().
|
inlinestatic |
Direct call to a function with four parameters.
chDelegateCallVeneer()
instead.[in] | tp | pointer to the delegate thread |
[in] | func | pointer to the function to be called |
[in] | p1 | parameter 1 passed as a msg_t |
[in] | p2 | parameter 2 passed as a msg_t |
[in] | p3 | parameter 3 passed as a msg_t |
[in] | p4 | parameter 4 passed as a msg_t |
msg_t
. Definition at line 197 of file chdelegates.h.
References __ch_delegate_fn4(), and chDelegateCallVeneer().