[project @ 2002-01-31 10:42:27 by sof]
authorsof <unknown>
Thu, 31 Jan 2002 10:42:28 +0000 (10:42 +0000)
committersof <unknown>
Thu, 31 Jan 2002 10:42:28 +0000 (10:42 +0000)
- 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
mk/config.h.in
mk/config.mk.in

index af910e2..e030223 100644 (file)
@@ -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)
index c334916..900e1b8 100644 (file)
 /* 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
 
 /* 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
 
 /* 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
 
 /* 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
 
 /* 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
 
 /* Define if you have the vsnprintf function.  */
 #undef HAVE_VSNPRINTF
 
-/* Define if you have the <Files.h> header file.  */
-#undef HAVE_FILES_H
-
-/* Define if you have the <GL/gl.h> header file.  */
-#undef HAVE_GL_GL_H
+/* Define if you have the _vsnprintf function.  */
+#undef HAVE__VSNPRINTF
 
 /* Define if you have the <arpa/inet.h> header file.  */
 #undef HAVE_ARPA_INET_H
 /* Define if you have the <dirent.h> header file.  */
 #undef HAVE_DIRENT_H
 
-/* Define if you have the <dl.h> header file.  */
-#undef HAVE_DL_H
-
 /* Define if you have the <dlfcn.h> header file.  */
 #undef HAVE_DLFCN_H
 
+/* Define if you have the <dl.h> header file.  */
+#undef HAVE_DL_H
+
 /* Define if you have the <dos.h> header file.  */
 #undef HAVE_DOS_H
 
 /* Define if you have the <fcntl.h> header file.  */
 #undef HAVE_FCNTL_H
 
+/* Define if you have the <Files.h> header file.  */
+#undef HAVE_FILES_H
+
 /* Define if you have the <float.h> header file.  */
 #undef HAVE_FLOAT_H
 
 /* Define if you have the <ftw.h> header file.  */
 #undef HAVE_FTW_H
 
+/* Define if you have the <GL/gl.h> header file.  */
+#undef HAVE_GL_GL_H
+
 /* Define if you have the <grp.h> header file.  */
 #undef HAVE_GRP_H
 
 /* Define if you have the <pascal.h> header file.  */
 #undef HAVE_PASCAL_H
 
+/* Define if you have the <pthread.h> header file.  */
+#undef HAVE_PTHREAD_H
+
 /* Define if you have the <pwd.h> header file.  */
 #undef HAVE_PWD_H
 
 /* Define if you have the <stat.h> header file.  */
 #undef HAVE_STAT_H
 
-/* Define if you have the <std.h> header file.  */
-#undef HAVE_STD_H
-
 /* Define if you have the <stdarg.h> header file.  */
 #undef HAVE_STDARG_H
 
 /* Define if you have the <stddef.h> header file.  */
 #undef HAVE_STDDEF_H
 
+/* Define if you have the <std.h> header file.  */
+#undef HAVE_STD_H
+
 /* Define if you have the <stdint.h> header file.  */
 #undef HAVE_STDINT_H
 
 /* Define if you have the <sys/syscall.h> header file.  */
 #undef HAVE_SYS_SYSCALL_H
 
-/* Define if you have the <sys/time.h> header file.  */
-#undef HAVE_SYS_TIME_H
-
 /* Define if you have the <sys/timeb.h> header file.  */
 #undef HAVE_SYS_TIMEB_H
 
+/* Define if you have the <sys/time.h> header file.  */
+#undef HAVE_SYS_TIME_H
+
 /* Define if you have the <sys/timers.h> header file.  */
 #undef HAVE_SYS_TIMERS_H
 
index 47c4174..a4a2cfb 100644 (file)
@@ -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