comparison: src/server/util/systhr.c
src/server/util/systhr.c
- changeset 41
- bb7a1f5a8b48
- parent 40
- 56cda23f48d4
- child 161
- aadda87bad1b
equal
deleted
inserted
replaced
41 #include "systhr.h" |
41 #include "systhr.h" |
42 //include "ereport.h" |
42 //include "ereport.h" |
43 |
43 |
44 //include "prinit.h" |
44 //include "prinit.h" |
45 //include "prthread.h" |
45 //include "prthread.h" |
46 #include "private/pprthred.h" |
46 //include "private/pprthred.h" |
47 |
47 |
48 #include "systems.h" |
48 #include "systems.h" |
49 |
49 |
50 #ifdef XP_UNIX |
50 #ifdef XP_UNIX |
51 #include <poll.h> |
51 #include <poll.h> |
105 //PR_Interrupt((PRThread *)thr); |
105 //PR_Interrupt((PRThread *)thr); |
106 } |
106 } |
107 |
107 |
108 void systhread_sleep(int msec) { |
108 void systhread_sleep(int msec) { |
109 if(msec > 0) { |
109 if(msec > 0) { |
110 poll(NULL, NULL, msec); |
110 poll(NULL, 0, msec); |
111 } else { |
111 } else { |
112 sched_yield(); |
112 sched_yield(); |
113 } |
113 } |
114 } |
114 } |
115 |
115 |