[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog support/pt_defs.h
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog support/pt_defs.h |
Date: |
Thu, 10 Jul 2008 08:24:19 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 08/07/10 08:24:19
Modified files:
. : ChangeLog
support : pt_defs.h
Log message:
Recall sem_wait in the case the previous call returned because the
thread
was interrupted.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3540&r2=1.3541
http://cvs.savannah.gnu.org/viewcvs/pnet/support/pt_defs.h?cvsroot=dotgnu-pnet&r1=1.11&r2=1.12
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3540
retrieving revision 1.3541
diff -u -b -r1.3540 -r1.3541
--- ChangeLog 1 Jun 2008 08:25:03 -0000 1.3540
+++ ChangeLog 10 Jul 2008 08:24:19 -0000 1.3541
@@ -1,3 +1,10 @@
+2008-07-10 Klaus Treichel <address@hidden>
+
+ * support/pt_defs.h (_ILSemaphoreWait): Retry sem_wait in the case the
+ call returned because the thread was interrupted.
+ * support/pt_defs.h (_ILThreadSuspendOther, _ILThreadResumeOther): Use
+ _ILSemaphoreWait instead of calling sem_wait directly (Heiko Weiss).
+
2008-06-01 Klaus Treichel <address@hidden>
* configure.in: Add check for existence of the header execinfo.h and the
Index: support/pt_defs.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/pt_defs.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- support/pt_defs.h 11 Feb 2007 14:34:32 -0000 1.11
+++ support/pt_defs.h 10 Jul 2008 08:24:19 -0000 1.12
@@ -21,6 +21,7 @@
#ifndef _PT_DEFS_H
#define _PT_DEFS_H
+#include <errno.h>
#include <semaphore.h>
#include <signal.h>
#ifdef HAVE_LIBGC
@@ -118,7 +119,7 @@
#define _ILThreadSuspendOther(thread) \
do { \
pthread_kill((thread)->handle, IL_SIG_SUSPEND);
\
- sem_wait(&((thread)->suspendAck)); \
+ _ILSemaphoreWait(&((thread)->suspendAck)); \
} while (0)
#define _ILThreadSuspendSelf(thread) \
do { \
@@ -129,7 +130,7 @@
do { \
(thread)->resumeRequested = 1; \
pthread_kill((thread)->handle, IL_SIG_RESUME); \
- sem_wait(&((thread)->resumeAck)); \
+ _ILSemaphoreWait(&((thread)->resumeAck)); \
(thread)->resumeRequested = 0; \
} while (0)
#define _ILThreadResumeSelf(thread)
_ILThreadResumeOther((thread))
@@ -204,7 +205,13 @@
*/
#define _ILSemaphoreCreate(sem) (sem_init((sem), 0, 0))
#define _ILSemaphoreDestroy(sem) (sem_destroy((sem)))
-#define _ILSemaphoreWait(sem) (sem_wait((sem)))
+#define _ILSemaphoreWait(sem) \
+ do { \
+ while(sem_wait((sem)) == -1 && errno == EINTR) \
+ { \
+ continue; \
+ } \
+ } while(0)
#define _ILSemaphorePost(sem) (sem_post((sem)))
int _ILSemaphorePostMultiple(_ILSemaphore *sem, ILUInt32 count);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog support/pt_defs.h,
Klaus Treichel <=