CANCEL_TASK macro
This commit is contained in:
parent
fe3aabcdc1
commit
4223b023dc
1 changed files with 3 additions and 0 deletions
|
@ -374,6 +374,9 @@ INLINE void cosched_set_invoke_target(CoSched *sched) { _cosched_global = sched;
|
|||
|
||||
DECLARE_EXTERN_TASK(_cancel_task_helper, { BoxedTask task; });
|
||||
|
||||
#define CANCEL_TASK(boxed_task) \
|
||||
(boxed_task.ptr ? cotask_cancel(cotask_unbox(boxed_task)) : false)
|
||||
|
||||
#define TASK_INDIRECT(iface, task) ( \
|
||||
(void)COTASK_UNUSED_CHECK_##task, \
|
||||
(TASK_INDIRECT_TYPE_ALIAS(task)) { ._cotask_##iface##_thunk = COTASKTHUNK_##task } \
|
||||
|
|
Loading…
Reference in a new issue