X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/forb.git/blobdiff_plain/8dd7b29079d26e5cdf8e5aa82759aeec169fa9d3..3265a99a276da8481f43f5218f458598f8d83037:/src/executor.c diff --git a/src/executor.c b/src/executor.c index f1a068d..9e725d0 100644 --- a/src/executor.c +++ b/src/executor.c @@ -194,16 +194,10 @@ error: /** * Determines the executor we are currently in. * - * @param executor Current executor pointer. - * - * @return Zero in case of success. + * @return Pointer to the current executor or NULL if not called + * within executor. */ -int forb_get_current_executor(forb_executor_t **executor) +forb_executor_t *forb_get_current_executor(void) { - int ret = 0; - *executor = (void *) pthread_getspecific(forb_executor_key); - - if (!(*executor)) - ret = 1; - return ret; + return pthread_getspecific(forb_executor_key); }