~dlh/armagetronad/os-x-toolkit

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
diff -ur a/include/zthread/Guard.h b/include/zthread/Guard.h
--- a/include/zthread/Guard.h	2005-03-12 21:10:09.000000000 -0500
+++ b/include/zthread/Guard.h	2019-10-29 21:11:56.000000000 -0400
@@ -114,11 +114,11 @@
       if(!Scope2::createScope(l, ms)) {
 
         Scope1::destroyScope(l);
-        return false;
+        return;
 
       }
        
-    return true;
+    return;
 
   }
 
@@ -428,7 +428,7 @@
   template <class U, class V>
   Guard(Guard<U, V>& g) : LockHolder<LockType>(g) {
 
-    LockingPolicy::shareScope(*this, extract(g));
+    LockingPolicy::shareScope(*this, this->extract(g));
     
   }
 
@@ -491,7 +491,7 @@
     
   try {
     
-    if(!isDisabled())
+    if(!this->isDisabled())
       LockingPolicy::destroyScope(*this);
     
   } catch (...) { /* ignore */ }  
diff -ur a/src/MutexImpl.h b/src/MutexImpl.h
--- a/src/MutexImpl.h	2005-03-12 22:59:15.000000000 -0500
+++ b/src/MutexImpl.h	2019-10-29 21:14:40.000000000 -0400
@@ -153,7 +153,7 @@
 
       _owner = self;
 
-      ownerAcquired(self);
+      this->ownerAcquired(self);
       
     }
 
@@ -164,7 +164,7 @@
       _waiters.insert(self);
       m.acquire();
 
-      waiterArrived(self);
+      this->waiterArrived(self);
 
       {        
       
@@ -173,7 +173,7 @@
       
       }
 
-      waiterDeparted(self);
+      this->waiterDeparted(self);
 
       m.release();
         
@@ -192,7 +192,7 @@
           assert(_owner == 0);
           _owner = self;    
 
-          ownerAcquired(self);
+          this->ownerAcquired(self);
 
           break;
         
@@ -236,7 +236,7 @@
 
       _owner = self;
 
-      ownerAcquired(self);
+      this->ownerAcquired(self);
       
     }
 
@@ -253,7 +253,7 @@
       
         m.acquire();
 
-        waiterArrived(self);
+        this->waiterArrived(self);
       
         {
         
@@ -262,7 +262,7 @@
         
         }
 
-        waiterDeparted(self);
+        this->waiterDeparted(self);
       
         m.release();
         
@@ -284,7 +284,7 @@
           assert(0 == _owner);
           _owner = self;
 
-          ownerAcquired(self);
+          this->ownerAcquired(self);
         
           break;
         
@@ -326,7 +326,7 @@
 
     _owner = 0;
 
-    ownerReleased(impl);
+    this->ownerReleased(impl);
   
     // Try to find a waiter with a backoff & retry scheme
     for(;;) {