revert some more spin optimizations that turned out to be pessimizations

This commit is contained in:
Rich Felker committed 2011-03-28 22:36:55 -04:00
1 parent 4cc78719dd
commit 4106cdcd2d
3 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ void __lockfile(FILE *f)
f->lockcount++;
return;
}
while (f->lock || a_cas(&f->lock, 0, tid))
while (a_cas(&f->lock, 0, tid))
if (spins) spins--, a_spin();
else syscall(SYS_sched_yield);
f->lockcount = 1;