… | |
… | |
1103 | |
1103 | |
1104 | void yield_cb (check_watcher &w) |
1104 | void yield_cb (check_watcher &w) |
1105 | { |
1105 | { |
1106 | // this should really be sched_yield(), but the linux guys thought |
1106 | // this should really be sched_yield(), but the linux guys thought |
1107 | // that giving a process calling sched_yield () less cpu time than |
1107 | // that giving a process calling sched_yield () less cpu time than |
1108 | // ones with high nice levels. |
1108 | // ones with high nice levels is a useful thing to do. It surely is is |
|
|
1109 | // allowed by the sus... as is returning ENOSYS. |
1109 | |
1110 | |
1110 | struct timespec ts = { 0, 0 }; |
1111 | struct timespec ts = { 0, 0 }; |
1111 | nanosleep (&ts, 0); |
1112 | nanosleep (&ts, 0); |
1112 | |
1113 | |
1113 | w.stop (); |
1114 | w.stop (); |