comparison compat.c @ 697:830e1f3672b9

Added draining mechanism for threads that don't have run loops.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 10 Mar 2011 23:28:10 +0000
parents 3e2ada9ee0ac
children 59c4fac42fb5
comparison
equal deleted inserted replaced
696:516e0c09d4b9 697:830e1f3672b9
1 /* $Id$ */ 1 /* $Id$ */
2 2
3 #include "compat.h" 3 #include "compat.h"
4 #include "dw.h"
4 #if defined(__OS2__) || defined(__WIN32__) 5 #if defined(__OS2__) || defined(__WIN32__)
5 #include <share.h> 6 #include <share.h>
6 #endif 7 #endif
7 8
8 #if defined(__UNIX__) || defined(__MAC__) 9 #if defined(__UNIX__) || defined(__MAC__)
33 req.tv_nsec = period * 10000000; 34 req.tv_nsec = period * 10000000;
34 35
35 nanosleep(&req, NULL); 36 nanosleep(&req, NULL);
36 #else 37 #else
37 usleep(period * 1000); 38 usleep(period * 1000);
39 #ifdef __MAC__
40 _dw_pool_drain();
41 #endif
38 #endif 42 #endif
39 } 43 }
40 #endif 44 #endif
41 45
42 int API makedir(char *path) 46 int API makedir(char *path)