[LibOS] Add support for `getcpu` syscall
Description of the changes
This PR was dependent on sysfs rewrite. Now that it is done, reviving this PR.
This commit adds an approx. implementation of getcpu syscall that returns a random set bit from cpu affinity mask associated
with calling thread and its corresponding NUMA node.
pthread_set_get_affinity regression test is extended to validate this implementation. This commit also enables the
getcpu01 ltp test for non-SGX case.
Closes https://github.com/gramineproject/graphene/pull/2331
How to test this PR?
Please run pthread_set_get_affinity LibOS regression test.
@vijaydhanraj We should rebase this PR, right?
@dimakuv Yes correct. Working on it.
Jenkins, test this please
Jenkins, test this please
Jenkins, test this please
Jenkins, test this please