nanokernel: Add scheduling context-independent API for starting fibers
When the exact scheduling context is not known it's convenient not to have to spell out the context in the name of the *_fiber_start() function. All of the fiber starting APIs map to the same _FiberStart() implementation, so all we have to do is to declare another alias for it. Change-Id: Ic6862383422f89ad7dc4f401e76d610826163bb9 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
9599f21dfb
commit
a789d4e97b
|
@ -68,6 +68,15 @@ extern int _context_essential_check(tCCS *pCtx);
|
|||
|
||||
/* fiber APIs
|
||||
*/
|
||||
/* scheduling context independent method (when context is not known) */
|
||||
void fiber_start(char *stack,
|
||||
unsigned stack_size,
|
||||
nano_fiber_entry_t entry,
|
||||
int arg1,
|
||||
int arg2,
|
||||
unsigned prio,
|
||||
unsigned options);
|
||||
|
||||
/* methods for fibers */
|
||||
extern void fiber_fiber_start(char *pStack,
|
||||
unsigned int stackSize,
|
||||
|
|
|
@ -140,6 +140,7 @@ int _context_essential_check(tCCS *pCtx /* pointer to context */
|
|||
|
||||
FUNC_ALIAS(_fiber_start, fiber_fiber_start, void);
|
||||
FUNC_ALIAS(_fiber_start, task_fiber_start, void);
|
||||
FUNC_ALIAS(_fiber_start, fiber_start, void);
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue