Diff for /libaitsched/example/test_time.c between versions 1.6 and 1.8

version 1.6, 2012/08/08 08:25:39 version 1.8, 2012/08/21 12:54:39
Line 21  void *event(sched_task_t *arg) Line 21  void *event(sched_task_t *arg)
   
 void *regular(sched_task_t *arg)  void *regular(sched_task_t *arg)
 {  {
        printf("Task::\n");        printf("Task(%lu):: %s\n", TASK_VAL(arg), (char*) TASK_ARG(arg));
         fflush(stdout);          fflush(stdout);
         return NULL;          return NULL;
 }  }
Line 40  void *alarmz(sched_task_t *arg) Line 40  void *alarmz(sched_task_t *arg)
   
 void *node(sched_task_t *arg)  void *node(sched_task_t *arg)
 {  {
        printf("Node %s fflags 0x%X\n", (char*) TASK_ARG(arg), (u_int) TASK_DATLEN(arg));        printf("Node %s data %d fflags 0x%X\n", (char*) TASK_ARG(arg), TASK_RET(arg), TASK_FLAG(arg));
         return NULL;          return NULL;
 }  }
   
 void *proc(sched_task_t *arg)  void *proc(sched_task_t *arg)
 {  {
        printf("Proc pid=%ld fflags 0x%X data %p\n", TASK_VAL(arg), (u_int) TASK_DATLEN(arg),         printf("Proc pid=%ld data %d fflags 0x%X\n", TASK_VAL(arg), TASK_RET(arg), TASK_FLAG(arg));
                        TASK_DATA(arg)); 
         return NULL;          return NULL;
 }  }
   
 void *sigz(sched_task_t *arg)  void *sigz(sched_task_t *arg)
 {  {
        printf("Signal signal=%ld\n", TASK_VAL(arg));        printf("Signal signal=%ld how many times %d\n", TASK_VAL(arg), TASK_RET(arg));
         return NULL;          return NULL;
 }  }
   
 #ifdef EVFILT_USER  #ifdef EVFILT_USER
 void *user(sched_task_t *arg)  void *user(sched_task_t *arg)
 {  {
        printf("User trigger id %ld fflags %d\n", TASK_VAL(arg), TASK_DATLEN(arg) & NOTE_FFLAGSMASK);        printf("User trigger id %ld fflags %d\n", TASK_VAL(arg), TASK_FLAG(arg) & NOTE_FFLAGSMASK);
         return NULL;          return NULL;
 }  }
 #endif  #endif
Line 139  main(int argc, char **argv) Line 138  main(int argc, char **argv)
                 return 2;                  return 2;
         }          }
   
        if (!schedTask(root, regular, "piuk", 1111, NULL, 0)) {        if (!schedTask(root, regular, "piuk", 11, NULL, 0)) {
                 printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());
                 return 3;
         }
         if (!schedTask(root, regular, "piuk", 1, NULL, 0)) {
                 printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());
                 return 3;
         }
         if (!schedTask(root, regular, "piuk", 0, NULL, 0)) {
                 printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());
                 return 3;
         }
         if (!schedTask(root, regular, "piuk", 1000001, NULL, 0)) {
                 printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());                  printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());
                 return 3;                  return 3;
         }          }

Removed from v.1.6  
changed lines
  Added in v.1.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>