c++linuxrhel5

Include file <sched_yield.h> not found on my RHEL 5


I'm using a fairly old dev environment, when I "man sched_yield" I can see this man page, but if I try to use it,

$cat m.cpp

#include<sched_yield.h>
int main(){
    return 0;
}

g++ will say:

error: sched_yield.h: No such file or directory

So should I install any extra yum package on this box? How to fix it?


Solution

  • The manpage I'm looking at says #include <sched.h>.

    It's the function that's called sched_yield.