… | |
… | |
48 | #include "../config.h" |
48 | #include "../config.h" |
49 | #include "rxvt.h" |
49 | #include "rxvt.h" |
50 | #include "rxvtperl.h" |
50 | #include "rxvtperl.h" |
51 | #include "version.h" |
51 | #include "version.h" |
52 | #include "command.h" |
52 | #include "command.h" |
53 | |
|
|
54 | #if HAVE_SCHED_YIELD |
|
|
55 | #undef HAVE_SCHED_YIELD // disabled for the time being |
|
|
56 | //# include <sched.h> |
|
|
57 | #endif |
|
|
58 | |
53 | |
59 | #ifdef KEYSYM_RESOURCE |
54 | #ifdef KEYSYM_RESOURCE |
60 | # include "keyboard.h" |
55 | # include "keyboard.h" |
61 | #endif |
56 | #endif |
62 | |
57 | |
… | |
… | |
1095 | w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); |
1090 | w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); |
1096 | } |
1091 | } |
1097 | } |
1092 | } |
1098 | #endif |
1093 | #endif |
1099 | |
1094 | |
1100 | #if HAVE_SCHED_YIELD |
1095 | #if LINUX_YIELD_HACK |
1101 | static struct event_handler |
1096 | static struct event_handler |
1102 | { |
1097 | { |
1103 | check_watcher cw_yield; |
1098 | check_watcher yield_ev; |
1104 | |
1099 | |
1105 | void yield (check_watcher &w) |
1100 | void yield_cb (check_watcher &w) |
1106 | { |
1101 | { |
1107 | sched_yield (); |
1102 | usleep (0); |
1108 | w.stop (); |
1103 | w.stop (); |
1109 | } |
1104 | } |
1110 | |
1105 | |
1111 | event_handler () |
1106 | event_handler () |
1112 | : cw_yield (this, &event_handler::yield) |
1107 | : yield_ev (this, &event_handler::yield_cb) |
1113 | { |
1108 | { |
1114 | } |
1109 | } |
1115 | } event_handler; |
1110 | } event_handler; |
1116 | #endif |
1111 | #endif |
1117 | |
1112 | |
… | |
… | |
1137 | cmdbuf_endp += r; |
1132 | cmdbuf_endp += r; |
1138 | return true; |
1133 | return true; |
1139 | } |
1134 | } |
1140 | else if (r < 0 && (errno == EAGAIN || errno == EINTR)) |
1135 | else if (r < 0 && (errno == EAGAIN || errno == EINTR)) |
1141 | { |
1136 | { |
1142 | #if HAVE_SCHED_YIELD |
1137 | #if LINUX_YIELD_HACK |
1143 | if (display->is_local) |
1138 | if (display->is_local) |
1144 | event_handler.cw_yield.start (); |
1139 | event_handler.yield_ev.start (); |
1145 | #endif |
1140 | #endif |
1146 | } |
1141 | } |
1147 | else |
1142 | else |
1148 | { |
1143 | { |
1149 | pty_ev.stop (); |
1144 | pty_ev.stop (); |