Changeset: f9ae182ac583 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f9ae182ac583
Modified Files:
        gdk/gdk_bbp.c
Branch: Jul2021
Log Message:

Move unlock.


diffs (21 lines):

diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -2733,8 +2733,6 @@ decref(bat i, bool logical, bool release
                if (((b->theap ? b->theap->size : 0) + (b->tvheap ? 
b->tvheap->size : 0)) < (GDK_vm_maxsize - GDKvm_cursize()) / 32)
                        chkflag |= BBPHOT;
        }
-       if (locked)
-               MT_lock_unset(&b->theaplock);
        /* only consider unloading if refs is 0; if, in addition, lrefs
         * is 0, we can definitely unload, else only if some more
         * conditions are met */
@@ -2760,6 +2758,8 @@ decref(bat i, bool logical, bool release
                swap = true;
        } /* else: bat cannot be swapped out */
        lrefs = BBP_lrefs(i);
+       if (locked)
+               MT_lock_unset(&b->theaplock);
 
        /* unlock before re-locking in unload; as saving a dirty
         * persistent bat may take a long time */
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to