Subversion Repositories HelenOS

Rev

Rev 2812 | Rev 2854 | 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) usleep(500000);
  27.  
  28.     printf("done\n");
  29.     return NULL;
  30. }
  31.