* threads.c (SuspendThread):
* timed-thread.c (_wapi_timed_thread_suspend): Wrap sem_wait in a
while loop. See bug 58161.
svn path=/trunk/mono/; revision=30291
+2004-06-24 Dick Porter <dick@ximian.com>
+
+ * threads.c (SuspendThread):
+ * timed-thread.c (_wapi_timed_thread_suspend): Wrap sem_wait in a
+ while loop. See bug 58161.
Wed Jun 23 23:29:04 CEST 2004 Paolo Molaro <lupus@ximian.com>
_wapi_timed_thread_suspend (thread_private_handle->thread);
else {
pthread_kill (thread_private_handle->thread->id, SIGPWR);
- MONO_SEM_WAIT (&thread_private_handle->thread->suspended_sem);
+ while (MONO_SEM_WAIT (&thread_private_handle->thread->suspended_sem) != 0) {
+ if (errno != EINTR) {
+ return(0xFFFFFFFF);
+ }
+ }
}
}
#ifdef HAVE_SEMAPHORE_H
#include <semaphore.h>
#endif
+#include <errno.h>
#include <mono/io-layer/processes.h>
exit (-1);
}
- MONO_SEM_WAIT (&thread->suspend_sem);
+ while (MONO_SEM_WAIT (&thread->suspend_sem) != 0 && errno == EINTR);
}
void _wapi_timed_thread_resume (TimedThread *thread)