Diff for /libaitsched/example/test.c between versions 1.1.2.2 and 1.3

version 1.1.2.2, 2011/08/13 17:17:08 version 1.3, 2011/12/08 09:18:25
Line 7 Line 7
 #include <netinet/in.h>  #include <netinet/in.h>
 #include <aitsched.h>  #include <aitsched.h>
   
void *event(void *arg)intptr_t Kill;
 
 void *event(sched_task_t *arg)
 {  {
         printf("Event::\n");          printf("Event::\n");
         return NULL;          return NULL;
 }  }
   
void *eventlo(void *arg)void *eventlo(sched_task_t *arg)
 {  {
         printf("EventLOW::\n");          printf("EventLOW::\n");
         return NULL;          return NULL;
 }  }
   
void *timer(void *arg)void *timer(sched_task_t *arg)
 {  {
         printf("Timer 10sec::\n");          printf("Timer 10sec::\n");
         return NULL;          return NULL;
 }  }
   
void *r(void *arg)void *r(sched_task_t *arg)
 {  {
         printf("read::\n");          printf("read::\n");
           Kill++;
         return NULL;          return NULL;
 }  }
   
void *w(void *arg)void *w(sched_task_t *arg)
 {  {
         printf("write::\n");          printf("write::\n");
         return NULL;          return NULL;
 }  }
   
void *once(void *arg)void *once(sched_task_t *arg)
 {  {
         printf("once::\n");          printf("once::\n");
         return NULL;          return NULL;
Line 49  main(int argc, char **argv) Line 52  main(int argc, char **argv)
         sched_root_task_t *root;          sched_root_task_t *root;
         int f;          int f;
         struct sockaddr_in sin;          struct sockaddr_in sin;
           struct timeval tv = { 10, 0 };
   
         f = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);          f = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
         if (f == -1)          if (f == -1)
Line 76  main(int argc, char **argv) Line 80  main(int argc, char **argv)
                 return 3;                  return 3;
         }          }
   
        if (!schedTimer(root, timer, "blah", 10000000)) {        if (!schedTimer(root, timer, "blah", tv)) {
                 printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());                  printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());
                 return 4;                  return 4;
         }          }
Line 93  main(int argc, char **argv) Line 97  main(int argc, char **argv)
   
         schedCallOnce(root, once, "000000", 42);          schedCallOnce(root, once, "000000", 42);
   
        schedRun(root);        schedRun(root, &Kill);
        schedEnd(root);        schedEnd(&root);
   
         close(f);          close(f);
         return 0;          return 0;

Removed from v.1.1.2.2  
changed lines
  Added in v.1.3


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