*** empty log message ***
authorroot <root>
Sun, 1 Jan 2006 06:18:20 +0000 (06:18 +0000)
committerroot <root>
Sun, 1 Jan 2006 06:18:20 +0000 (06:18 +0000)
Changes
autoconf/config.h.in
autoconf/configure.in
configure
src/command.C

diff --git a/Changes b/Changes
index b0dbe4eb23ef9c3dd30bc3ee2af4f4015e3cb51f..2b516614cce912ec4bc657b31fbee9de2c628efe 100644 (file)
--- a/Changes
+++ b/Changes
@@ -28,7 +28,8 @@ WISH: just for fun, do shade and tint with XRender.
           on a few architectures). Reported by darix.
         - include one trailing space in rectangular selections to indicate
           the inserted newline (yeah, weird, but visually more pleasing).
-        - try to use sched_yield to improve terminal data transfer efficiency.
+        - try to use sched_yield to (drastically) improve terminal data
+          transfer efficiency.
         - further minor cleanups.
 
 6.1  Tue Dec 27 13:23:40 CET 2005
index b90b4900687f628d8c045577d2d81207b49355f6..4e7f442a3169829329e2ef4feba913ef0d3e41e3 100644 (file)
 /* Needed to get declarations for msg_control and msg_controllen on Solaris */
 #undef __EXTENSIONS__
 
+/* Define if you have sched-h and sched_yield */
+#undef HAVE_SCHED_YIELD
+
 /* Build shared library version - specify via configure only */
 #undef LIBRXVT
 
index da11bd45f19649cbb0728493e5325c891208347d..3daba5a5fd119dbc47dae8a344e1048fee32148e 100644 (file)
@@ -83,6 +83,13 @@ dnl solaris needs to link libnsl and socket
 AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl,    gethostbyname, [LIBS="$LIBS -lnsl"])])
 AC_CHECK_FUNC(socket,        [], [AC_CHECK_LIB(socket, socket,        [LIBS="$LIBS -lsocket"])])
 
+dnl sched_yield to improve terminal efficiency
+AC_MSG_CHECKING(for sched_yield support)
+AC_TRY_LINK([#include <sched.h>],[sched_yield ()],
+            [AC_MSG_RESULT(yes)
+             AC_DEFINE(HAVE_SCHED_YIELD, 1, Define if you have sched-h and sched_yield)],
+            [AC_MSG_RESULT(no)])
+
 dnl AC_ENABLE_SHARED(no)dnl#   libtool
 dnl AC_ENABLE_STATIC(yes)dnl#  libtool
 dnl AC_PROG_LIBTOOL()dnl#              libtool
index fa00e71775e93b0d22469e05831b077b181ec122..6c3664d618e5421b44b12ca8c9816264c05daca1 100755 (executable)
--- a/configure
+++ b/configure
@@ -4099,6 +4099,61 @@ fi
 fi
 
 
+echo "$as_me:$LINENO: checking for sched_yield support" >&5
+echo $ECHO_N "checking for sched_yield support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sched.h>
+int
+main ()
+{
+sched_yield ()
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SCHED_YIELD 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
 
 MALLOC_TYPE=S
 
index 23090b7b1ccda6eb495f03aa652d832837a3900f..fbca6ea8a0fc441d0099e8743b5c06d338baafbc 100644 (file)
 #include "version.h"
 #include "command.h"
 
+#if HAVE_SCHED_YIELD
+# include <sched.h>
+#endif
+
 #ifdef KEYSYM_RESOURCE
 # include "keyboard.h"
 #endif
 
 #include <csignal>
 
-#define HAVE_SCHED_YIELD 1 //D//TODO//FIXME
-#if HAVE_SCHED_YIELD
-# include <sched.h>
-#endif
-
 /*----------------------------------------------------------------------*/
 
 #define IS_CONTROL(ch) !((ch) & 0xffffff60UL)