which have the necessary functions (gettimeofday, select).
* acconfig.h: Added GUILE_ISELECT.
+1997-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * configure.in: Added code to enable GUILE_ISELECT on systems
+ which have the necessary functions (gettimeofday, select).
+
+ * acconfig.h: Added GUILE_ISELECT.
+
1997-11-24 Tim Pierce <twp@twp.tezcat.com>
* acinclude.m4: Assume dlsym does not add underscore if
* Changes to the scm_ interface
+** Function: int scm_internal_select (int fds,
+ SELECT_TYPE *rfds,
+ SELECT_TYPE *wfds,
+ SELECT_TYPE *efds,
+ struct timeval *timeout);
+
+This is a replacement for the `select' function provided by the OS.
+It enables I/O blocking and sleeping to happen for one cooperative
+thread without blocking other threads. It also avoids busy-loops in
+these situations. It is intended that all I/O blocking and sleeping
+will finally go through this function. Currently, this function is
+only available on systems providing `gettimeofday' and `select'.
+
** Function: SCM scm_internal_stack_catch (SCM tag,
scm_catch_body_t body,
void *body_data,
the Guile library itself. */
#undef GUILE_DEBUG
+/* Define to implement scm_internal_select */
+#undef GUILE_ISELECT
+
/* Define if using cooperative multithreading. */
#undef USE_COOP_THREADS
GUILE_DLSYM_USCORE
-AC_CHECK_FUNCS(ctermid ftime getcwd geteuid gethostent gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid)
+AC_CHECK_FUNCS(ctermid ftime getcwd geteuid gethostent gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid bzero)
dnl <GNU-WIN32 hacks>
LIBOBJS="$LIBOBJS threads.o"
fi
+#--------------------------------------------------------------------
+#
+# scm_internal_select
+#
+#--------------------------------------------------------------------
+
+if test "$cy_cv_threads_package" != "" &&
+ test $ac_cv_func_gettimeofday = yes &&
+ test $ac_cv_func_select = yes; then
+ AC_DEFINE(GUILE_ISELECT, 1)
+ LIBOBJS="$LIBOBJS iselect.o"
+fi
+
## If we're using GCC, ask for aggressive warnings.
case "$GCC" in
yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;