--- libaitsched/example/test_time.c 2013/08/15 18:50:02 1.10.8.5 +++ libaitsched/example/test_time.c 2013/08/15 18:58:09 1.10.8.6 @@ -34,7 +34,7 @@ void *timer(sched_task_t *arg) void *rtc(sched_task_t *arg) { - printf("RTC %p sec:: rtc id %lx\n", TASK_ARG(arg), (long) TASK_DATA(arg)); + printf("RTC %p sec:: rtc id %lx signo=%lu\n", TASK_ARG(arg), (long) TASK_DATA(arg), TASK_VAL(arg)); taskExit(arg, NULL); } @@ -212,6 +212,15 @@ main(int argc, char **argv) ts.tv_nsec = 500000000; } + if (!schedRTC(root, rtc, (void*) (intptr_t) ts.tv_sec, ts, (void*) 10, 0)) { + printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); + return 5; + } + if (!schedRTC(root, rtc, (void*) (intptr_t) ts.tv_sec, ts, (void*) 10, 0)) { + printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); + return 5; + } + 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; @@ -291,6 +300,9 @@ main(int argc, char **argv) } sleep(1); schedCancel(t); + + schedCancelby(root, taskRTC, CRITERIA_DATA, (void*) 2, NULL); +// schedCancelby(root, taskRTC, CRITERIA_DATA, (void*) 10, NULL); if (argc > 1) if (!schedProc(root, proc, NULL, atoi(argv[1]), 0, 0)) {