From: Mike F. <va...@ge...> - 2011-12-31 20:14:23
|
On Thursday 22 December 2011 05:12:21 Cyril Hrubis wrote: > > > I think using cat /proc/cpuinfo get core number is better. > > > > But /proc/cpuinfo may not be supported by other OS. > > Yes, procfs is linux specific. no, it's not. but much of the stuff that linux puts under /proc is Linux specific like "cpuinfo". in fact, the format of "cpuinfo" under Linux tends to change based on the arch you're running on ... since this patch is against the open_posix_testsuite, we need to stick to POSIX APIs (although, the forking of open_posix_testsuite in ltp is pretty awful in general). if it were against a different tree, then not caring about non-Linux would be fine. -mike |