فهرست منبع

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...
Rich Felker 14 سال پیش
والد
کامیت
77f15d108e
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      src/stdio/__lockfile.c
  2. 1 1
      src/thread/__wait.c

+ 1 - 1
src/stdio/__lockfile.c

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

+ 1 - 1
src/thread/__wait.c

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