|
version 1.1.2.2, 2012/05/10 14:44:22
|
version 1.2.4.1, 2012/05/30 08:34:43
|
|
Line 3
|
Line 3
|
| #include <fcntl.h> |
#include <fcntl.h> |
| #include <sys/types.h> |
#include <sys/types.h> |
| #include <sys/stat.h> |
#include <sys/stat.h> |
| #include <sys/socket.h> | #include <sys/signal.h> |
| #include <netinet/in.h> |
#include <netinet/in.h> |
| #include <aitsched.h> |
#include <aitsched.h> |
| |
|
|
Line 27 void *timer(sched_task_t *arg)
|
Line 27 void *timer(sched_task_t *arg)
|
| return NULL; |
return NULL; |
| } |
} |
| |
|
| |
void *alarmz(sched_task_t *arg) |
| |
{ |
| |
printf("Alarm %ld sec::\n", (intptr_t) TASK_ARG(arg)); |
| |
return NULL; |
| |
} |
| |
|
| void *once(sched_task_t *arg) |
void *once(sched_task_t *arg) |
| { |
{ |
| printf("once::\n"); |
printf("once::\n"); |
|
Line 83 main(int argc, char **argv)
|
Line 89 main(int argc, char **argv)
|
| return 4; |
return 4; |
| } |
} |
| |
|
| |
ts.tv_sec = 11; |
| |
if (!schedAlarm(root, alarmz, (void*) ts.tv_sec, ts, NULL, 0)) { |
| |
printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); |
| |
return 5; |
| |
} |
| |
|
| schedCallOnce(root, once, "000000", 42, NULL, 0); |
schedCallOnce(root, once, "000000", 42, NULL, 0); |
| |
|
| |
printf("read_queue=%d timer_queue=%d\n", |
| |
ROOT_QUEUE_EMPTY(root, read), ROOT_QUEUE_EMPTY(root, timer)); |
| |
|
| // schedPolling(root, &p, NULL); |
// schedPolling(root, &p, NULL); |
| schedRun(root, &Kill); |
schedRun(root, &Kill); |