Skip to content

Commit 8e78560

Browse files
committed
Merge pull request swiftlang#40 from frankeh/fix_readsynctest
fix dispatch_readsync test case under linux
2 parents 28441d7 + 20339f5 commit 8e78560

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/dispatch_readsync.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ main(void)
135135
uint32_t activecpu, wq_max_threads;
136136
#ifdef __linux__
137137
activecpu = sysconf(_SC_NPROCESSORS_ONLN);
138-
wq_max_threads = sysconf(_SC_NPROCESSORS_CONF); // LINUX_PORT_HDD FIXME: Is this correct?
138+
// don't want to parse /proc/sys/kernel/threads-max
139+
wq_max_threads = activecpu * NTHREADS + 2;
139140
#else
140141
size_t s = sizeof(uint32_t);
141142
sysctlbyname("hw.activecpu", &activecpu, &s, NULL, 0);

0 commit comments

Comments
 (0)