diff options
author | joerg <joerg@pkgsrc.org> | 2014-08-19 13:43:37 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2014-08-19 13:43:37 +0000 |
commit | 4d5b11f223842c92447989d3bb5f1c4fdbfde125 (patch) | |
tree | 521c1195c19bb45fe77c307dd3354274862ad527 /time/fet | |
parent | 9e953df1201f19601087aa19e199d00104553688 (diff) | |
download | pkgsrc-4d5b11f223842c92447989d3bb5f1c4fdbfde125.tar.gz |
Don't conflict with C++11 std::mutex.
Diffstat (limited to 'time/fet')
-rw-r--r-- | time/fet/distinfo | 3 | ||||
-rw-r--r-- | time/fet/patches/patch-src_engine_generate.cpp | 121 |
2 files changed, 123 insertions, 1 deletions
diff --git a/time/fet/distinfo b/time/fet/distinfo index 4fb55bdd9e3..85dd7d127a8 100644 --- a/time/fet/distinfo +++ b/time/fet/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1 2014/08/07 21:59:02 wiz Exp $ +$NetBSD: distinfo,v 1.2 2014/08/19 13:43:37 joerg Exp $ SHA1 (fet-5.23.1.tar.bz2) = 2dca265ffd286936dfcde52fa8a028c3a180af8c RMD160 (fet-5.23.1.tar.bz2) = e365d206ea2d44d99b45297e50edc5c3fde7fcbb Size (fet-5.23.1.tar.bz2) = 8463474 bytes +SHA1 (patch-src_engine_generate.cpp) = 9e47375c0d90b28efa8a9a8e2a04ff5a3750440e diff --git a/time/fet/patches/patch-src_engine_generate.cpp b/time/fet/patches/patch-src_engine_generate.cpp new file mode 100644 index 00000000000..0f1c0455a2b --- /dev/null +++ b/time/fet/patches/patch-src_engine_generate.cpp @@ -0,0 +1,121 @@ +$NetBSD: patch-src_engine_generate.cpp,v 1.1 2014/08/19 13:43:37 joerg Exp $ + +--- src/engine/generate.cpp.orig 2014-08-19 12:46:36.000000000 +0000 ++++ src/engine/generate.cpp +@@ -2600,7 +2600,7 @@ void Generate::generate(int maxSeconds, + } + + if(threaded){ +- mutex.lock(); ++ ::mutex.lock(); + } + c.makeUnallocated(gt.rules); + +@@ -2616,7 +2616,7 @@ if(threaded){ + maxActivitiesPlaced=0; + + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + + triedRemovals.resize(gt.rules.nInternalActivities, gt.rules.nHoursPerWeek); +@@ -2649,13 +2649,13 @@ if(threaded){ + time(&starting_time); + + if(threaded){ +- mutex.lock(); ++ ::mutex.lock(); + } + timeToHighestStage=0; + searchTime=0; + generationStartDateTime=QDateTime::currentDateTime(); + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + + //2000 was before +@@ -2670,11 +2670,11 @@ if(threaded){ + prevvalue: + + if(threaded){ +- mutex.lock(); ++ ::mutex.lock(); + } + if(abortOptimization){ + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + return; + } +@@ -2684,7 +2684,7 @@ if(threaded){ + + if(searchTime>=maxSeconds){ + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + + timeExceeded=true; +@@ -2949,7 +2949,7 @@ if(threaded){ + if(!foundGoodSwap){ + if(impossibleActivity){ + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + nDifficultActivities=1; + difficultActivities[0]=permutation[added_act]; +@@ -3079,7 +3079,7 @@ if(threaded){ + + added_act=q+1; + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + + //if(semaphorePlacedActivity){ +@@ -3123,18 +3123,18 @@ if(threaded){ + } + + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + emit(activityPlaced(added_act+1)); + if(threaded){ + semaphorePlacedActivity.acquire(); + } + if(threaded){ +- mutex.lock(); ++ ::mutex.lock(); + } + if(added_act==gt.rules.nInternalActivities && foundGoodSwap){ + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + break; + } +@@ -3154,7 +3154,7 @@ if(threaded){ + } + + if(threaded){ +- mutex.unlock(); ++ ::mutex.unlock(); + } + } + +@@ -9123,8 +9123,8 @@ skip_here_if_already_allocated_in_time: + if(level==0 && (nConflActivities[perm[0]]==MAX_ACTIVITIES)){ + //to check if generation was stopped + if(this->isThreaded){ +- mutex.unlock(); +- mutex.lock(); ++ ::mutex.unlock(); ++ ::mutex.lock(); + } + if(!abortOptimization && activity_count_impossible_tries<MAX_RETRIES_FOR_AN_ACTIVITY_AT_LEVEL_0){ + activity_count_impossible_tries++; |