![]() | |||||||||||||
Messages in this thread |
In article <20020408221223.GE13043@werewolf.able.es> you wrote: > On 2002.04.08 "Kuppuswamy, Priyadarshini" wrote: >>I don't think that (sysconf(_SC_NPROCESSORS_CONF)) command works on linux. It works on Unix. I tried that. It returns 1 when there are 4 processors on linux. >> > Tried and works. get_nproc_conf and _SC_NPROCESSORS_CONF work the same. Using "strace getconf _NPROCESSORS_CONF" it tells me, that glibc is also parsing /proc/cpuinfo. BTW: there are _NPROCESSORS_CONF and _NPROCESSORS_ONLN, works for me: 3ecki@calista:~> getconf _NPROCESSORS_CONF 1 3ecki@calista:~> getconf _NPROCESSORS_ONLN 1 ecki@SeeDeBrCVS:~$ getconf _NPROCESSORS_CONF 2 ecki@SeeDeBrCVS:~$ getconf _NPROCESSORS_ONLN 2 Greetings Bernd - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 12:25 [from the cache] ©2003-2008 | |||||||||||||