#932 sched_yield is missing

closed-invalid
nobody
None
2006-04-26
2006-04-26
No

Hi,

I'm using cygwin's gcc-mingw-core 20050522-1 and mingw-runtime 3.9-2, and it looks like int sched_yield(void) is missing, though it could be implemented very easily by just calling Sleep(0). Posix says that the prototype should be in <sched.h>. It would also be useful (and it is possible) to implement sched_set/getscheduler, sched_set/getparam, sched_get_priority_max/min, sched_rr_get_interval, and sched_set/getaffinity.

Regards,
Samuel

Discussion

  • Earnie Boyd

    Earnie Boyd - 2006-04-26
    • status: open --> closed
     
  • Earnie Boyd

    Earnie Boyd - 2006-04-26
    • status: closed --> closed-invalid
     
  • Earnie Boyd

    Earnie Boyd - 2006-04-26

    Logged In: YES
    user_id=15438

    MinGW doesn't support most POSIX features. You will need to
    adjust your code in a fashion that will support #ifdef _WIN32.

     
  • Samuel Thibault

    Samuel Thibault - 2006-04-26

    Logged In: YES
    user_id=902030

    Ok, but why not supporting such easy-to-implement feature? sched_yield() is just a matter of something like:

    #define sched_yield() Sleep(0)

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks