844 |
{ |
{ |
845 |
struct timeval now; |
struct timeval now; |
846 |
struct timespec timeout; |
struct timespec timeout; |
847 |
|
|
848 |
|
#if !defined(PTW32_STATIC_LIB) |
849 |
sigset_t mask; |
sigset_t mask; |
850 |
|
|
851 |
/* Block all signals so that we don't try to execute a Caml signal handler */ |
/* Block all signals so that we don't try to execute a Caml signal handler */ |
853 |
pthread_sigmask(SIG_BLOCK, &mask, NULL); |
pthread_sigmask(SIG_BLOCK, &mask, NULL); |
854 |
|
|
855 |
nice(19); |
nice(19); |
856 |
|
#endif |
857 |
|
|
858 |
pthread_mutex_lock(&mutex); |
pthread_mutex_lock(&mutex); |
859 |
|
|
1138 |
#endif |
#endif |
1139 |
} |
} |
1140 |
#endif /* defined(__MINGW32__) */ |
#endif /* defined(__MINGW32__) */ |
1141 |
|
|
1142 |
|
|
1143 |
|
value |
1144 |
|
external_start (void) |
1145 |
|
{ |
1146 |
|
|
1147 |
|
#if defined(HAVE_PTHREAD) && defined(PTW32_STATIC_LIB) |
1148 |
|
pthread_win32_process_attach_np(); |
1149 |
|
#endif |
1150 |
|
return Val_unit; |
1151 |
|
|
1152 |
|
} |
1153 |
|
|
1154 |
|
value |
1155 |
|
external_exit (void) |
1156 |
|
{ |
1157 |
|
|
1158 |
|
#if defined(HAVE_PTHREAD) && defined(PTW32_STATIC_LIB) |
1159 |
|
pthread_win32_process_detach_np(); |
1160 |
|
#endif |
1161 |
|
|
1162 |
|
return Val_unit; |
1163 |
|
} |
1164 |
|
|