From 4106cdcd2de34bf3b9839e042344d92eae887ecb Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 28 Mar 2011 22:36:55 -0400 Subject: revert some more spin optimizations that turned out to be pessimizations --- src/stdio/__lockfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdio/__lockfile.c') diff --git a/src/stdio/__lockfile.c b/src/stdio/__lockfile.c index 93c94867..c0948255 100644 --- a/src/stdio/__lockfile.c +++ b/src/stdio/__lockfile.c @@ -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; -- cgit v1.2.1