*** empty log message ***
authorroot <root>
Tue, 31 Jan 2006 21:35:39 +0000 (21:35 +0000)
committerroot <root>
Tue, 31 Jan 2006 21:35:39 +0000 (21:35 +0000)
Changes
src/command.C
src/feature.h

diff --git a/Changes b/Changes
index deb963f244e2c88c3530b9a5684e468f31f88a5f..eb4e7a87d59ce22d31595426ed9dae35a9cd60bc 100644 (file)
--- a/Changes
+++ b/Changes
@@ -19,6 +19,8 @@ TODO: xim "how to" faq entry
        - changed interpretation of [alpha] colour prefix.
         - +option now really sets the option to default, instead of using the
           resource value.
+        - the linux yield hack is back, now using usleep, and enabled only on
+          __linux__.
         - further round trip eliminations in the !XFT case by remembering
           the colour components.
         - plain scrollbar works better with -sr.
index dbf2aaf1ba3ccacf6a93b2e883eab9e5cd17e733..9d8b31591bcfbb16a52aa2c56189bc46b0b1ee14 100644 (file)
@@ -1092,6 +1092,24 @@ rxvt_term::slip_wheel_cb (time_watcher &w)
 }
 #endif
 
+#if LINUX_YIELD_HACK
+static struct event_handler
+{
+  check_watcher yield_ev;
+  
+  void yield_cb (check_watcher &w)
+  {
+    usleep (0);
+    w.stop ();
+  }
+
+  event_handler ()
+  : yield_ev (this, &event_handler::yield_cb)
+  {
+  }
+} event_handler;
+#endif
+
 bool
 rxvt_term::pty_fill ()
 {
@@ -1116,9 +1134,9 @@ rxvt_term::pty_fill ()
     }
   else if (r < 0 && (errno == EAGAIN || errno == EINTR))
     {
-#if HAVE_SCHED_YIELD
+#if LINUX_YIELD_HACK
       if (display->is_local)
-        event_handler.cw_yield.start ();
+        event_handler.yield_ev.start ();
 #endif
     }
   else
index a0cbc33ddc0f313f7268652ec1d86d1dee279bc4..cc6be64c3da572dd96f4e677fde40a39d07f3dd3 100644 (file)
  */
 #define VISUAL_BELL_DURATION .020
 
+/*--------------------------------OTHER---------------------------------*/
+
+/*
+ * Enable the linux yield/usleep hack, which can dramatically improve
+ * performance without hurting. See command.C for details.
+ */
+#if __linux__
+# define LINUX_YIELD_HACK 1
+#endif
+
 #endif