worthwhile performance benefits over -O.
*/
+// FIXME catch sync signals (SEGV, basically) and unlock BHL,
+// if held. Otherwise a LOCK-prefixed insn which segfaults
+// gets Helgrind into a total muddle as the BHL will not be
+// released after the insn.
+
// FIXME what is supposed to happen to locks in memory which
// is relocated as a result of client realloc?
-// FIXME some kind of ownership recycling problem in
-// init_thread_specific_state() for programs which use the same thread
-// slot more than once?
-
// FIXME put referencing ThreadId into Thread and get
// rid of the slow reverse mapping function.
while (True) {
if (t == NULL) return NULL;
cmpres = kCmp(t->key, k);
- if (cmpres > 0) t = t->child[0]; else
+ if (cmpres > 0) t = t->child[0]; else
if (cmpres < 0) t = t->child[1]; else
return t;
}
cmpres = ((Word)t->key) - ((Word)k);
if (cmpres == 0) return t; /* unlikely ==> predictable */
cmpresU = (UWord)cmpres;
- cmpresU >>=/*unsigned*/ (8 * sizeof(cmpres) - 1);
+ cmpresU >>=/*unsigned*/ (8 * sizeof(cmpresU) - 1);
t = t->child[cmpresU];
}
}