Skip to content
Snippets Groups Projects
Commit 866ca000 authored by FILIPPONE Jerome's avatar FILIPPONE Jerome
Browse files

Upload New File

parent d8487e00
Branches
Tags
No related merge requests found
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/types.h>
int main() {
unsigned cpu, node;
// Get current CPU core and NUMA node via system call
// Note this has no glibc wrapper so we must call it directly
syscall(SYS_getcpu, &cpu, &node, NULL);
// Display information
printf("This program is running on CPU core %u and NUMA node %u.\n\n", cpu, node);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment