Re: system call for finding the number of cpus??
Christoph Hellwig (hch@infradead.org)
Mon, 8 Apr 2002 22:27:42 +0100
On Mon, Apr 08, 2002 at 05:25:08PM -0400, Robert Love wrote:
> Linux does not implement such a syscall. Note
>
> cat /proc/cpuinfo | grep processor | wc -l
>
> works and is simple; you do not have to do it via script - execute it in
> your C program, save the one-line output, and atoi() it.
I guess there is at least one architecture on which it breaks..
See http://people.nl.linux.org/~hch/cpuinfo/ for details.
-
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/