Page MenuHomeFreeBSD

D18046.diff
No OneTemporary

D18046.diff

Index: head/lib/libthr/thread/thr_init.c
===================================================================
--- head/lib/libthr/thread/thr_init.c
+++ head/lib/libthr/thread/thr_init.c
@@ -474,8 +474,9 @@
PANIC("Cannot get stack rlimit");
_thr_stack_initial = rlim.rlim_cur;
}
- len = sizeof(_thr_is_smp);
- sysctlbyname("kern.smp.cpus", &_thr_is_smp, &len, NULL, 0);
+ _thr_is_smp = sysconf(_SC_NPROCESSORS_CONF);
+ if (_thr_is_smp == -1)
+ PANIC("Cannot get _SC_NPROCESSORS_CONF");
_thr_is_smp = (_thr_is_smp > 1);
_thr_page_size = getpagesize();
_thr_guard_default = _thr_page_size;

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 1, 4:27 AM (9 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39996348
Default Alt Text
D18046.diff (613 B)

Event Timeline