Breaking userspace
Posted Jan 29, 2013 13:12 UTC (Tue) by
eru (subscriber, #2753)
In reply to:
There are real reasons to question systemd by nix
Parent article:
Poettering: The Biggest Myths
I recently wrote some code that wants to know how many cores or processors there are in the Linux system, so it can estimate how many parallel threads it makes sense to set up. I did this by scanning "/proc/cpuinfo". Is this now in danger of breaking at any time, because it relies on "something the kernel exports other than syscalls?"
In that case I would like to know of some alternate, more stable way to get this information - and preferably without adding dependencies on some heavy-duty libraries or middleware, since the program currently depends on nothing but its own code, the standard C library, and pthreads.
(
Log in to post comments)