Changeset: 40e3cdb94e56 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=40e3cdb94e56 Modified Files: gdk/gdk_system.c gdk/gdk_system.h Branch: pyapi Log Message:
Revert rev a61ae7e30676 (ignore locks in forked process). diffs (60 lines): diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c --- a/gdk/gdk_system.c +++ b/gdk/gdk_system.c @@ -55,8 +55,6 @@ #include <unistd.h> /* for sysconf symbols */ -int forked_process = 0; - MT_Lock MT_system_lock MT_LOCK_INITIALIZER("MT_system_lock"); #if !defined(USE_PTHREAD_LOCKS) && !defined(NDEBUG) diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h --- a/gdk/gdk_system.h +++ b/gdk/gdk_system.h @@ -126,7 +126,6 @@ typedef struct { #define MT_lock_destroy(l) pthread_mutex_destroy(&(l)->lock) #define MT_lock_set(l, n) \ do { \ - if (forked_process) break; \ TEMDEBUG fprintf(stderr, "#%s: locking %s...\n", (n), (l)->name); \ pthread_mutex_lock(&(l)->lock); \ TEMDEBUG fprintf(stderr, "#%s: locking %s complete\n", \ @@ -134,7 +133,6 @@ typedef struct { } while (0) #define MT_lock_unset(l, n) \ do { \ - if (forked_process) break; \ TEMDEBUG fprintf(stderr, "#%s: unlocking %s\n", \ (n), (l)->name); \ pthread_mutex_unlock(&(l)->lock); \ @@ -259,7 +257,6 @@ gdk_export ATOMIC_TYPE volatile GDKlocks #define MT_lock_set(l, n) \ do { \ - if (forked_process) break; \ _DBG_LOCK_COUNT_0(l, n); \ if (ATOMIC_TAS((l)->lock, dummy, n) != 0) { \ /* we didn't get the lock */ \ @@ -336,13 +333,11 @@ typedef struct { #define MT_sema_destroy(s) pthread_sema_destroy(&(s)->sema) #define MT_sema_up(s, n) \ do { \ - if (forked_process) break; \ TEMDEBUG fprintf(stderr, "#%s: sema %s up\n", (n), (s)->name); \ pthread_sema_up(&(s)->sema); \ } while (0) #define MT_sema_down(s, n) \ do { \ - if (forked_process) break; \ TEMDEBUG fprintf(stderr, "#%s: sema %s down...\n",(n), (s)->name); \ pthread_sema_down(&(s)->sema); \ TEMDEBUG fprintf(stderr, "#%s: sema %s down complete\n", \ @@ -360,6 +355,4 @@ gdk_export int MT_check_nr_cores(void); gdk_export lng GDKusec(void); gdk_export int GDKms(void); -extern int forked_process; - #endif /*_GDK_SYSTEM_H_*/ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list