From: root Date: Tue, 31 Jan 2006 21:47:56 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=bfee7773dbcd5219a1fe7f5b126f4ce96557df7d;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/command.C b/src/command.C index 9d8b3159..c59d16f5 100644 --- a/src/command.C +++ b/src/command.C @@ -57,6 +57,10 @@ #include +#if LINUX_YIELD_HACK +# include +#endif + /*----------------------------------------------------------------------*/ #define IS_CONTROL(ch) !((ch) & 0xffffff60UL) @@ -1099,7 +1103,13 @@ static struct event_handler void yield_cb (check_watcher &w) { - usleep (0); + // this should really be sched_yield(), but the linux guys thought + // that giving a process calling sched_yield () less cpu time than + // ones with high nice levels. + + struct timespec ts = { 0, 0 }; + nanosleep (&ts, 0); + w.stop (); }