src/task.c
/**
 * @brief  Entry point for a new task
 *
 * This runs the user function, kills the task, and restores the
 * parent context.
 *
 * @param  t   task pointer
 * @param  fn  function for the body of the task
 */
@brief  Entry point for a new task
This runs the user function, kills the task, and restores the
parent context.

@param  t   task pointer
@param  fn  function for the body of the task
@brief Entry point for a new task This runs the user function kills the task and restores the parent context . @param t task pointer @param fn function for the body of the task
static void
entry(struct xtask *t, union xvalue (*fn)(void *, union xvalue))
{
	struct xtask *p = t->parent;
	union xvalue val = fn(xtask_local(t), t->value);
	eol(t, val, 0);
	current = p;
	p->state = CURRENT;
	xctx_swap(&t->ctx, &p->ctx);
}
static void entry ( struct xtask * t , union xvalue ( * fn ) ( void * , union xvalue ) ) { struct xtask * p = t -> parent ; union xvalue val = fn ( xtask_local ( t ) , t -> value ) ; eol ( t , val , 0 ) ; current = p ; p -> state = CURRENT ; xctx_swap ( & t -> ctx , & p -> ctx ) ; }
@brief  Entry point for a new task
 This runs the user function, kills the task, and restores the
 parent context.
@brief Entry point for a new task This runs the user function kills the task and restores the parent context .