reduce some ridiculously large spin counts

these should be tweaked according to testing. offhand i know 1000 is
too low and 5000 is likely to be sufficiently high. consider trying to
add futexes to file locking, too...
This commit is contained in:
Rich Felker 2011-05-06 21:45:48 -04:00
parent 9dd6399c95
commit 77f15d108e
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
void __lockfile(FILE *f) void __lockfile(FILE *f)
{ {
int spins=100000; int spins=10000;
int tid; int tid;
if (f->lock < 0) return; if (f->lock < 0) return;

View File

@ -2,7 +2,7 @@
void __wait(volatile int *addr, volatile int *waiters, int val, int priv) void __wait(volatile int *addr, volatile int *waiters, int val, int priv)
{ {
int spins=50000; int spins=10000;
if (priv) priv = 128; priv=0; if (priv) priv = 128; priv=0;
while (spins--) { while (spins--) {
if (*addr==val) a_spin(); if (*addr==val) a_spin();