]> granicus.if.org Git - gc/commit
Workaround some Linux/arm kernels bug to get correct GC_nprocs value
authorIvan Maidanski <ivmai@mail.ru>
Tue, 24 Jan 2012 15:31:53 +0000 (19:31 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 24 Jan 2012 15:31:53 +0000 (19:31 +0400)
commit1835b18c9a208ef50d07081e39e084d74c2551bc
tree198fa617156139480a74fd29dc2448786750c4c1
parentee90c474c1800dbfc00eb218be04f0c3fba8fce0
Workaround some Linux/arm kernels bug to get correct GC_nprocs value

* pthread_support.c (STAT_READ, STAT_BUF_SIZE): Move the definition
out of PLATFORM_ANDROID condition.
* pthread_support.c (GC_get_nprocs_present): New static function
obtaining number of avalable CPUs from
"/sys/devices/system/cpu/present" (only Linux/arm excluding NaCl).
* pthread_support.c (GC_thr_init): Invoke GC_get_nprocs_present
(unless set from the environment variable) to workaround a bug in
some Linux/arm kernels (including Android).
pthread_support.c