aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/tst-cond16.c7
-rw-r--r--nptl/tst-cond18.c8
2 files changed, 3 insertions, 12 deletions
diff --git a/nptl/tst-cond16.c b/nptl/tst-cond16.c
index 032677a..b3bfb90 100644
--- a/nptl/tst-cond16.c
+++ b/nptl/tst-cond16.c
@@ -28,7 +28,7 @@ pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
bool n, exiting;
FILE *f;
-int count;
+enum { count = 8 }; /* Number of worker threads. */
void *
tf (void *dummy)
@@ -71,11 +71,6 @@ do_test (void)
return 1;
}
- count = sysconf (_SC_NPROCESSORS_ONLN);
- if (count <= 0)
- count = 1;
- count *= 4;
-
pthread_t th[count];
pthread_attr_t attr;
int i, ret, sz;
diff --git a/nptl/tst-cond18.c b/nptl/tst-cond18.c
index 187f3af..6276110 100644
--- a/nptl/tst-cond18.c
+++ b/nptl/tst-cond18.c
@@ -28,7 +28,8 @@
pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
bool exiting;
-int fd, count, spins, nn;
+int fd, spins, nn;
+enum { count = 8 }; /* Number of worker threads. */
void *
tf (void *id)
@@ -82,11 +83,6 @@ do_test (void)
return 1;
}
- count = sysconf (_SC_NPROCESSORS_ONLN);
- if (count <= 0)
- count = 1;
- count *= 8;
-
pthread_t th[count + 1];
pthread_attr_t attr;
int i, ret, sz;