Commits

Armin Rigo  committed a2c9a87

Kill remaining code attempting to support prebuilt locks, which doesn't
really work (e.g. on OS/X the mutexes and condition variables need to be
reinitialized after fork()).

  • Participants
  • Parent commits e4d1e11

Comments (0)

Files changed (4)

File pypy/translator/c/node.py

 
     def initializationexpr(self, decoration=''):
         T = self.getTYPE()
-        yield 'RPyOpaque_INITEXPR_%s' % (T.tag,)
+        raise NotImplementedError(
+            'seeing an unexpected prebuilt object: %s' % (T.tag,))
 
     def startupcode(self):
         T = self.getTYPE()

File pypy/translator/c/src/thread_nt.c

  * Thread support.
  */
 
-#define RPyOpaque_INITEXPR_ThreadLock  { 0, 0, NULL }
 typedef struct RPyOpaque_ThreadLock NRMUTEX, *PNRMUTEX;
 
 typedef struct {

File pypy/translator/c/src/thread_nt.h

  * Thread support.
  */
 
-#define RPyOpaque_INITEXPR_ThreadLock  { 0, 0, NULL }
-
 typedef struct RPyOpaque_ThreadLock {
 	LONG   owned ;
 	DWORD  thread_id ;

File pypy/translator/c/src/thread_pthread.h

 	int initialized;
 };
 
-#define RPyOpaque_INITEXPR_ThreadLock  { { /* sem */ }, 0 }
-
 #else /* !USE_SEMAPHORE */
 
 /* A pthread mutex isn't sufficient to model the Python lock type
 	struct RPyOpaque_ThreadLock *prev, *next;
 };
 
-#define RPyOpaque_INITEXPR_ThreadLock  {        \
-		0, 0,                           \
-		PTHREAD_COND_INITIALIZER,       \
-		PTHREAD_MUTEX_INITIALIZER       \
-	}
 #endif /* USE_SEMAPHORE */
 
 /* prototypes */