Author: Armin Rigo <[email protected]>
Branch:
Changeset: r59118:a2c9a87cbc98
Date: 2012-11-28 15:55 -0800
http://bitbucket.org/pypy/pypy/changeset/a2c9a87cbc98/
Log: 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()).
diff --git a/pypy/translator/c/node.py b/pypy/translator/c/node.py
--- a/pypy/translator/c/node.py
+++ b/pypy/translator/c/node.py
@@ -976,7 +976,8 @@
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()
diff --git a/pypy/translator/c/src/thread_nt.c
b/pypy/translator/c/src/thread_nt.c
--- a/pypy/translator/c/src/thread_nt.c
+++ b/pypy/translator/c/src/thread_nt.c
@@ -13,7 +13,6 @@
* Thread support.
*/
-#define RPyOpaque_INITEXPR_ThreadLock { 0, 0, NULL }
typedef struct RPyOpaque_ThreadLock NRMUTEX, *PNRMUTEX;
typedef struct {
diff --git a/pypy/translator/c/src/thread_nt.h
b/pypy/translator/c/src/thread_nt.h
--- a/pypy/translator/c/src/thread_nt.h
+++ b/pypy/translator/c/src/thread_nt.h
@@ -4,8 +4,6 @@
* Thread support.
*/
-#define RPyOpaque_INITEXPR_ThreadLock { 0, 0, NULL }
-
typedef struct RPyOpaque_ThreadLock {
LONG owned ;
DWORD thread_id ;
diff --git a/pypy/translator/c/src/thread_pthread.h
b/pypy/translator/c/src/thread_pthread.h
--- a/pypy/translator/c/src/thread_pthread.h
+++ b/pypy/translator/c/src/thread_pthread.h
@@ -42,8 +42,6 @@
int initialized;
};
-#define RPyOpaque_INITEXPR_ThreadLock { { /* sem */ }, 0 }
-
#else /* !USE_SEMAPHORE */
/* A pthread mutex isn't sufficient to model the Python lock type
@@ -57,11 +55,6 @@
struct RPyOpaque_ThreadLock *prev, *next;
};
-#define RPyOpaque_INITEXPR_ThreadLock { \
- 0, 0, \
- PTHREAD_COND_INITIALIZER, \
- PTHREAD_MUTEX_INITIALIZER \
- }
#endif /* USE_SEMAPHORE */
/* prototypes */
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit