Changeset: e4a14affa896 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4a14affa896
Modified Files:
        monetdb5/mal/mal_dataflow.c
        monetdb5/mal/mal_profiler.c
Branch: default
Log Message:

Avoid putting yourself ina deadlock.


diffs (56 lines):

diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c
--- a/monetdb5/mal/mal_dataflow.c
+++ b/monetdb5/mal/mal_dataflow.c
@@ -897,7 +897,7 @@ runDFLOWworker(void *t)
                                        /* speed up wake up when we have memory 
or too many sleepers */
                                        factor = MT_getrss()/(MEMORY_THRESHOLD 
* monet_memory);
                                        delay = (long)( DELAYUNIT * (factor > 
1.0 ? 1.0:factor));
-                                       delay = (long) (delay * (1.0 - 
asleep/GDKnr_threads));
+                                       //delay = (long) (delay * (1.0 - 
asleep/GDKnr_threads));
                                        if ( delay)
                                                MT_sleep_ms( delay );
                                        clk -= DELAYUNIT;
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -869,18 +869,18 @@ initTrace(void)
 {
        if (TRACE_init)
                return 0;       /* already initialized */
-       mal_set_lock(mal_profileLock, "profileLock");
+       mal_set_lock(mal_contextLock, "profileLock");
        _initTrace();
-       mal_unset_lock(mal_profileLock, "profileLock");
+       mal_unset_lock(mal_contextLock, "profileLock");
        return TRACE_init ? 0 : -1;
 }
 
 str
 cleanupProfiler(void)
 {
-       mal_set_lock(mal_profileLock, "cleanup");
+       mal_set_lock(mal_contextLock, "cleanup");
        _cleanupProfiler();
-       mal_unset_lock(mal_profileLock, "cleanup");
+       mal_unset_lock(mal_contextLock, "cleanup");
        return MAL_SUCCEED;
 }
 
@@ -889,7 +889,7 @@ clearTrace(void)
 {
        if (TRACE_init == 0)
                return;     /* not initialized */
-       mal_set_lock(mal_profileLock, "cleanup");
+       mal_set_lock(mal_contextLock, "cleanup");
        /* drop all trace tables */
        BBPclear(TRACE_id_event->batCacheid);
        BBPclear(TRACE_id_time->batCacheid);
@@ -903,7 +903,7 @@ clearTrace(void)
        BBPclear(TRACE_id_writes->batCacheid);
        TRACE_init = 0;
        _initTrace();
-       mal_unset_lock(mal_profileLock, "cleanup");
+       mal_unset_lock(mal_contextLock, "cleanup");
 }
 
 BAT *
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to