Subversion Repositories HelenOS

Rev

Rev 2853 | Rev 2867 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <thread.h>
  4. #include "../tester.h"
  5.  
  6. volatile int done;
  7.  
  8. void t_proc(void *arg)
  9. {
  10.     printf("this is 'test' thread [wait for key]\n");
  11.     getchar();
  12.     done = 1;
  13. }
  14.  
  15. char * test_debug1(bool quiet)
  16. {
  17.     int rc;
  18.     thread_id_t tid;
  19.  
  20.     done = 0;
  21.  
  22.     printf("running debug1 test\n");
  23.     rc = thread_create(t_proc, NULL, "test", &tid);
  24.  
  25.     //printf("(active) wait for thread 'test'\n");
  26.     while (!done) {
  27.         usleep(5000000);
  28.         printf(".");
  29.     }
  30.  
  31.     printf("done\n");
  32.     return NULL;
  33. }
  34.