From fed216d780cba6214f191f945a1cdf5d481d8337 Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 31 Jan 2002 10:42:28 +0000 Subject: [PATCH] [project @ 2002-01-31 10:42:27 by sof] - new option --enable-threaded-rts, which turns on RTS support for better interop with native threads. - check for pthread.h - new config.mk variable, GhcRtsThreaded (={YES,NO}) --- configure.in | 13 +++++++++- mk/config.h.in | 73 +++++++++++++++++++++++++++++-------------------------- mk/config.mk.in | 11 +++++++++ 3 files changed, 61 insertions(+), 36 deletions(-) diff --git a/configure.in b/configure.in index af910e2..e030223 100644 --- a/configure.in +++ b/configure.in @@ -442,6 +442,17 @@ fi; fi; +dnl ** Enable multi-thread friendly RTS? +dnl -------------------------------------------------------------- +AC_ARG_ENABLE(threaded-rts, +[ --enable-threaded-rts + Support better interop with OS threads. +], +[ThreadedRts=YES], +[ThreadedRts=NO] +) +AC_SUBST(ThreadedRts) + dnl ** Enable the construction of Win32 DLLs? dnl -------------------------------------------------------------- AC_ARG_ENABLE(win32-dlls, @@ -653,7 +664,7 @@ dnl ** check for full ANSI header (.h) files AC_HEADER_STDC dnl ** check for specific header (.h) files that we are interested in -AC_CHECK_HEADERS(Files.h arpa/inet.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h inttypes.h limits.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdint.h stdlib.h stddef.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/limits.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netdb.h netinet/in.h netinet/tcp.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/un.h sys/utsname.h sys/vadvise.h sys/wait.h termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h bfd.h winsock.h) +AC_CHECK_HEADERS(Files.h arpa/inet.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h inttypes.h limits.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdint.h stdlib.h stddef.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/limits.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netdb.h netinet/in.h netinet/tcp.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/un.h sys/utsname.h sys/vadvise.h sys/wait.h termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h bfd.h winsock.h pthread.h) AC_CHECK_HEADER(readline/readline.h, HaveReadlineReadlineH=YES, HaveReadlineReadlineH=NO) AC_CHECK_HEADER(readline/history.h, HaveReadlineHistoryH=YES, HaveReadlineHistoryH=NO) diff --git a/mk/config.h.in b/mk/config.h.in index c334916..900e1b8 100644 --- a/mk/config.h.in +++ b/mk/config.h.in @@ -351,27 +351,6 @@ /* The number of bytes in a void *. */ #undef SIZEOF_VOID_P -/* Define if you have the PBHSetVolSync function. */ -#undef HAVE_PBHSETVOLSYNC - -/* Define if you have the _fullpath function. */ -#undef HAVE__FULLPATH - -/* Define if you have the _pclose function. */ -#undef HAVE__PCLOSE - -/* Define if you have the _popen function. */ -#undef HAVE__POPEN - -/* Define if you have the _snprintf function. */ -#undef HAVE__SNPRINTF - -/* Define if you have the _stricmp function. */ -#undef HAVE__STRICMP - -/* Define if you have the _vsnprintf function. */ -#undef HAVE__VSNPRINTF - /* Define if you have the access function. */ #undef HAVE_ACCESS @@ -396,6 +375,9 @@ /* Define if you have the ftime function. */ #undef HAVE_FTIME +/* Define if you have the _fullpath function. */ +#undef HAVE__FULLPATH + /* Define if you have the getclock function. */ #undef HAVE_GETCLOCK @@ -426,12 +408,21 @@ /* Define if you have the mprotect function. */ #undef HAVE_MPROTECT +/* Define if you have the PBHSetVolSync function. */ +#undef HAVE_PBHSETVOLSYNC + /* Define if you have the pclose function. */ #undef HAVE_PCLOSE +/* Define if you have the _pclose function. */ +#undef HAVE__PCLOSE + /* Define if you have the popen function. */ #undef HAVE_POPEN +/* Define if you have the _popen function. */ +#undef HAVE__POPEN + /* Define if you have the readdir_r function. */ #undef HAVE_READDIR_R @@ -447,6 +438,9 @@ /* Define if you have the snprintf function. */ #undef HAVE_SNPRINTF +/* Define if you have the _snprintf function. */ +#undef HAVE__SNPRINTF + /* Define if you have the stat function. */ #undef HAVE_STAT @@ -462,6 +456,9 @@ /* Define if you have the stricmp function. */ #undef HAVE_STRICMP +/* Define if you have the _stricmp function. */ +#undef HAVE__STRICMP + /* Define if you have the symlink function. */ #undef HAVE_SYMLINK @@ -486,11 +483,8 @@ /* Define if you have the vsnprintf function. */ #undef HAVE_VSNPRINTF -/* Define if you have the header file. */ -#undef HAVE_FILES_H - -/* Define if you have the header file. */ -#undef HAVE_GL_GL_H +/* Define if you have the _vsnprintf function. */ +#undef HAVE__VSNPRINTF /* Define if you have the header file. */ #undef HAVE_ARPA_INET_H @@ -513,12 +507,12 @@ /* Define if you have the header file. */ #undef HAVE_DIRENT_H -/* Define if you have the header file. */ -#undef HAVE_DL_H - /* Define if you have the header file. */ #undef HAVE_DLFCN_H +/* Define if you have the header file. */ +#undef HAVE_DL_H + /* Define if you have the header file. */ #undef HAVE_DOS_H @@ -528,12 +522,18 @@ /* Define if you have the header file. */ #undef HAVE_FCNTL_H +/* Define if you have the header file. */ +#undef HAVE_FILES_H + /* Define if you have the header file. */ #undef HAVE_FLOAT_H /* Define if you have the header file. */ #undef HAVE_FTW_H +/* Define if you have the header file. */ +#undef HAVE_GL_GL_H + /* Define if you have the header file. */ #undef HAVE_GRP_H @@ -570,6 +570,9 @@ /* Define if you have the header file. */ #undef HAVE_PASCAL_H +/* Define if you have the header file. */ +#undef HAVE_PTHREAD_H + /* Define if you have the header file. */ #undef HAVE_PWD_H @@ -585,15 +588,15 @@ /* Define if you have the header file. */ #undef HAVE_STAT_H -/* Define if you have the header file. */ -#undef HAVE_STD_H - /* Define if you have the header file. */ #undef HAVE_STDARG_H /* Define if you have the header file. */ #undef HAVE_STDDEF_H +/* Define if you have the header file. */ +#undef HAVE_STD_H + /* Define if you have the header file. */ #undef HAVE_STDINT_H @@ -639,12 +642,12 @@ /* Define if you have the header file. */ #undef HAVE_SYS_SYSCALL_H -/* Define if you have the header file. */ -#undef HAVE_SYS_TIME_H - /* Define if you have the header file. */ #undef HAVE_SYS_TIMEB_H +/* Define if you have the header file. */ +#undef HAVE_SYS_TIME_H + /* Define if you have the header file. */ #undef HAVE_SYS_TIMERS_H diff --git a/mk/config.mk.in b/mk/config.mk.in index 47c4174..a4a2cfb 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -297,6 +297,17 @@ GhcRtsCcOpts=-O2 -fomit-frame-pointer # Include the front panel code? Needs GTK+. GhcRtsWithFrontPanel = NO +# +# To have the RTS support interoperation with OS threads, set +# GhcRtsThreaded to YES (preferably via the --enable-threaded-rts +# configure script option). The consequence of this is spelled out +# in details elsewhere, but, briefly, Concurrent Haskell threads +# can now make external (i.e., C) calls without blocking the progress +# of other CH threads. Multiple native threads can also execute +# Haskell code without getting in each others way too. +# +GhcRtsThreaded=@ThreadedRts@ + ################################################################################ # # hslibs project -- 1.7.10.4