Hi,
Are the C functions sched_getcpu() and getcpu() deprecated in Leap 15.1?
Because I can’t find them on my system. But the man-pages exists for these functions.
Always get the following compiler warning:
$ gcc -o test main.c
main.c: In function ‘main’:
main.c:9:33: warning: implicit declaration of function ‘sched_getcpu’; did you mean ‘sched_getparam’? -Wimplicit-function-declaration]
printf("CPU: %d
", sched_getcpu());
^~~~~~~~~~~~
sched_getparam
$
Here the code:
#include <stdio.h>
#include <sched.h>
int main(int argc, char *argv])
{
printf("CPU: %d
", sched_getcpu());
}