--- libaitsched/example/test_time.c 2013/10/21 13:37:28 1.12.4.1 +++ libaitsched/example/test_time.c 2014/06/05 22:31:09 1.13.12.2 @@ -4,11 +4,11 @@ #include #include #include -#include #include #include #include #include +#include "../inc/config.h" intptr_t Kill; sched_root_task_t *root; @@ -210,10 +210,13 @@ main(int argc, char **argv) return 4; } +#if SUP_ENABLE == KQ_SUPPORT if (!schedAlarm(root, alarmz, (void*) (intptr_t) ts.tv_sec, ts, NULL, 0)) { printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); return 5; - } else { + } else +#endif + { ts.tv_sec = 3; ts.tv_nsec = 500000000; } @@ -227,6 +230,7 @@ main(int argc, char **argv) return 5; } +#if SUP_ENABLE == KQ_SUPPORT if (!schedAlarm(root, alarmz, (void*) (intptr_t) ts.tv_sec, ts, (void*) 1, 0)) { printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); return 5; @@ -234,14 +238,18 @@ main(int argc, char **argv) if (!schedAlarm(root, alarmz, (void*) (intptr_t) ts.tv_sec, ts, (void*) 2, 0)) { printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); return 5; - } else { + } else +#endif + { ts.tv_sec = 0; ts.tv_nsec = 700000000; } +#if SUP_ENABLE == KQ_SUPPORT if (!schedAlarm(root, alarmz, (void*) (intptr_t) ts.tv_sec, ts, (void*) 3, 0)) { printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); return 5; } +#endif #ifdef EVFILT_USER if (!(tt[0] = schedUser(root, user, NULL, 42, 0, 0))) { @@ -336,11 +344,13 @@ main(int argc, char **argv) #endif schedResumeby(root, CRITERIA_DATA, task); +#if SUP_ENABLE == KQ_SUPPORT if (!schedSignal(root, sigz, NULL, SIGUSR1, 0, 0)) { printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); close(f); return 9; } +#endif #ifdef EVFILT_USER schedTrigger(tt[2]);