Example #1
0
File: worker.c Project: jsyk/lpel
lpel_task_t *LpelWorkerCurrentTask(void)
{
  workerctx_t *w = GetCurrentWorker();
  /* It is quite a common bug to call LpelWorkerCurrentTask() from a non-task context.
   * Provide an assertion error instead of just segfaulting on a null dereference. */
  assert(w && "Currently not in an LPEL worker context!");
  return w->current_task; 
}
Example #2
0
File: worker.c Project: jsyk/lpel
workerctx_t *LpelWorkerSelf(void)
{
  return GetCurrentWorker();
}
Example #3
0
lpel_task_t *LpelWorkerCurrentTask(void)
{
  return GetCurrentWorker()->current_task;
}