]> 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>
Thu, 26 Jan 2012 16:47:21 +0000 (20:47 +0400)
commitcebfd92286f10f4d6f8faaa73a5e61896a42d3ad
tree3525211ce9e92b95b84ecdf22e8122890fca35d6
parentd55ae3329cc612715b0506ed814601123a58d4e7
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