Changeset: 4ce064e6b169 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4ce064e6b169
Modified Files:
        gdk/gdk_system.c
Branch: Jun2023
Log Message:

With LOCK_OWNER defined (debug only), remove lock from list even when not 
inited.


diffs (31 lines):

diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -380,9 +380,11 @@ MT_thread_add_mylock(MT_Lock *lock)
 void
 MT_thread_del_mylock(MT_Lock *lock)
 {
+       struct winthread *w;
        if (threadslot == TLS_OUT_OF_INDEXES)
-               return;
-       struct winthread *w = TlsGetValue(threadslot);
+               w = &mainthread;
+       else
+               w = TlsGetValue(threadslot);
 
        if (w) {
                if (w->mylocks == lock) {
@@ -864,9 +866,11 @@ MT_thread_add_mylock(MT_Lock *lock)
 void
 MT_thread_del_mylock(MT_Lock *lock)
 {
+       struct posthread *p;
        if (!thread_initialized)
-               return;
-       struct posthread *p = pthread_getspecific(threadkey);
+               p = &mainthread;
+       else
+               p = pthread_getspecific(threadkey);
 
        if (p) {
                if (p->mylocks == lock) {
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to