--- libaitsched/example/test.c 2012/08/08 08:24:51 1.7.2.1 +++ libaitsched/example/test.c 2012/08/21 11:45:34 1.8.4.1 @@ -115,6 +115,12 @@ void *aiobulkwrite(sched_task_t *arg) } #endif +void *thr(sched_task_t *arg) +{ + printf("thread(%lu):: %s\n", TASK_VAL(arg), (char*) TASK_ARG(arg)); + taskExit(arg, 42); +} + void sig(int s) { switch (s) { @@ -197,6 +203,19 @@ main(int argc, char **argv) if (!schedWrite(root, w, "www", f, NULL, 0)) { printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); return 6; + } + + if (!schedThread(root, thr, "mdaaaa this is thread task", 0, NULL, 0)) { + printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); + return 7; + } + if (!schedThread(root, thr, "mdaaaa this is thread task -detached", 42, NULL, 0)) { + printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); + return 7; + } + if (!schedThread(root, thr, "mdaaaa this is thread task -j", 0, NULL, 0)) { + printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError()); + return 7; } #ifdef AIO_SUPPORT