--- libaitsched/src/tasks.c 2014/06/03 20:39:54 1.24.2.4 +++ libaitsched/src/tasks.c 2015/07/02 22:43:30 1.25.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: tasks.c,v 1.24.2.4 2014/06/03 20:39:54 misho Exp $ +* $Id: tasks.c,v 1.25.2.2 2015/07/02 22:43:30 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2014 +Copyright 2004 - 2015 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -97,63 +97,6 @@ sched_unuseTask(sched_task_t * __restrict task) return task; } -#pragma GCC visibility push(hidden) - -#ifdef HAVE_LIBPTHREAD -void * -_sched_threadWrapper(sched_task_t *t) -{ - void *ret = NULL; - sched_root_task_t *r; - - if (!t || !TASK_ROOT(t)) - pthread_exit(ret); - else - r = (sched_root_task_t*) TASK_ROOT(t); - - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - /* - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - */ - - /* notify parent, thread is ready for execution */ - pthread_testcancel(); - - ret = schedCall(t); - r->root_ret = ret; - - if (TASK_VAL(t)) { - transit_task2unuse(t, &r->root_thread); - TASK_VAL(t) = 0; - } - - pthread_exit(ret); -} -#endif - -#if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) -void * -_sched_rtcWrapper(sched_task_t *t) -{ - sched_task_t *task; - void *ret; - - if (!t || !TASK_ROOT(t) || !TASK_DATA(t)) - return NULL; - else { - task = (sched_task_t*) TASK_DATA(t); - timer_delete((timer_t) TASK_DATLEN(t)); - } - - ret = schedCall(task); - - transit_task2unuse(task, &(TASK_ROOT(task))->root_rtc); - return ret; -} -#endif - -#pragma GCC visibility pop - /* * sched_taskExit() - Exit routine for scheduler task, explicit required for thread tasks * @@ -1278,7 +1221,8 @@ sched_task_t * schedRTC(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, struct timespec ts, void *opt_data, size_t opt_dlen) { -#if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) +#if defined(HAVE_LIBRT) && defined(HAVE_TIMER_CREATE) && \ + defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) sched_task_t *task; void *ptr;