ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.302 by root, Tue Jan 31 21:35:39 2006 UTC vs.
Revision 1.304 by root, Tue Jan 31 22:01:25 2006 UTC

54#ifdef KEYSYM_RESOURCE 54#ifdef KEYSYM_RESOURCE
55# include "keyboard.h" 55# include "keyboard.h"
56#endif 56#endif
57 57
58#include <csignal> 58#include <csignal>
59
60#if LINUX_YIELD_HACK
61# include <ctime>
62#endif
59 63
60/*----------------------------------------------------------------------*/ 64/*----------------------------------------------------------------------*/
61 65
62#define IS_CONTROL(ch) !((ch) & 0xffffff60UL) 66#define IS_CONTROL(ch) !((ch) & 0xffffff60UL)
63 67
1097{ 1101{
1098 check_watcher yield_ev; 1102 check_watcher yield_ev;
1099 1103
1100 void yield_cb (check_watcher &w) 1104 void yield_cb (check_watcher &w)
1101 { 1105 {
1102 usleep (0); 1106 // this should really be sched_yield(), but the linux guys thought
1107 // that giving a process calling sched_yield () less cpu time than
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.
1110
1111 struct timespec ts = { 0, 0 };
1112 nanosleep (&ts, 0);
1113
1103 w.stop (); 1114 w.stop ();
1104 } 1115 }
1105 1116
1106 event_handler () 1117 event_handler ()
1107 : yield_ev (this, &event_handler::yield_cb) 1118 : yield_ev (this, &event_handler::yield_cb)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines