#include <unistd.h>
#include "gwlib/gwlib.h"
 
Go to the source code of this file.
◆ main()
Definition at line 85 of file test_wakeup.c.
References debug(), gwlib_init(), gwlib_shutdown(), gwthread_cancel(), gwthread_create, gwthread_join_all(), gwthread_wakeup(), gwthread_wakeup_all(), thread1(), and thread2().
   93     debug(
"test", 0, 
"Parent pid %ld", (
long)pid);
    99     debug(
"test", 0 ,
"gwthread_cancel returns: %d", ret);
 void gwthread_join_all(void)
 
static void thread2(void *arg)
 
#define gwthread_create(func, arg)
 
void debug(const char *place, int err, const char *fmt,...)
 
void gwthread_wakeup(long thread)
 
void gwlib_shutdown(void)
 
int gwthread_cancel(long thread)
 
void gwthread_wakeup_all(void)
 
static void thread1(void *arg)
 
 
 
 
◆ thread1()
  
  
      
        
          | static void thread1  | 
          ( | 
          void *  | 
          arg | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 61 of file test_wakeup.c.
References debug(), and gwthread_sleep().
Referenced by main().
   65     debug(
"test", 0, 
"Sleeping");
    67     debug(
"test", 0, 
"Thread1 pid %ld", (
long)pid);
    70     debug(
"test", 0, 
"Woke up");
 void gwthread_sleep(double seconds)
 
void debug(const char *place, int err, const char *fmt,...)
 
 
 
 
◆ thread2()
  
  
      
        
          | static void thread2  | 
          ( | 
          void *  | 
          arg | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 73 of file test_wakeup.c.
References debug(), and gwthread_sleep().
Referenced by main().
   77     debug(
"test", 0, 
"Sleeping");
    79     debug(
"test", 0, 
"Thread2 pid %ld", (
long)pid);
    82     debug(
"test", 0, 
"Woke up");
 void gwthread_sleep(double seconds)
 
void debug(const char *place, int err, const char *fmt,...)