I'm writing a program that needs to know what logical processor it's running on.
This question tells me how to do it in assembly, while this question tells me how to use this code in assembly without translating it to AT&T syntax.
Is there an easier way to do this using existing Linux system calls or library functions, or is it necessary for me to reinvent the wheel?