summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorivmai <ivmai>2010-08-14 10:06:17 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:54 +0200
commit9fe5bf2f4a698aeb4d24322844a113a0d0178a26 (patch)
tree76bdf6b856af7e9e5584741edf8c66c48aedeb58 /doc
parent0bf3ec4a9e0ed4ff241c57c36cb63544a6899513 (diff)
2010-08-14 Ivan Maidanski <ivmai@mail.ru> (with help from Hans Boehm)
* include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the beginning of the file. * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New macro (defined only for Linux and Solaris). * include/gc_pthread_redirects.h (GC_pthread_cancel, GC_pthread_exit): Declare new API function (only if GC_PTHREAD_EXIT_ATTRIBUTE). * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit): Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE). * include/private/pthread_support.h (DISABLED_GC): New macro. * pthread_support.c (pthread_cancel, pthread_exit): Restore original definition or declare "real" function (if needed and GC_PTHREAD_EXIT_ATTRIBUTE). * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t): Declare new types if needed. * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE). * pthread_support.c (GC_init_real_syms): Initialise pointers to the "real" pthread_cancel and pthread_exit (only if GC_PTHREAD_EXIT_ATTRIBUTE). * pthread_support.c (GC_unregister_my_thread): Enable collections if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE). * pthread_support.c (pthread_cancel, pthread_exit): New wrapped function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined). * pthread_support.c (GC_start_routine): Refine the comment. * extra/threadlibs.c (main): Adjust --wrap (add "read", "pthread_exit", "pthread_cancel" but remove "sleep"). * doc/README.linux (GC_USE_LD_WRAP): Ditto. * doc/README.linux: Expand all tabs to spaces; remove trailing spaces at EOLn.
Diffstat (limited to 'doc')
-rw-r--r--doc/README.linux18
1 files changed, 8 insertions, 10 deletions
diff --git a/doc/README.linux b/doc/README.linux
index 3c50181..e462e71 100644
--- a/doc/README.linux
+++ b/doc/README.linux
@@ -11,7 +11,7 @@ Incremental GC is generally supported.
Dynamic libraries are supported on an ELF system. A static executable
should be linked with the gcc option "-Wl,-defsym,_DYNAMIC=0".
-The collector appears to work reliably with Linux threads, but beware
+The collector appears to work reliably with Linux threads, but beware
of older versions of glibc and gdb.
The garbage collector uses SIGPWR and SIGXCPU if it is used with
@@ -29,7 +29,7 @@ To use threads, you need to abide by the following requirements:
2) You must compile the collector with -DGC_LINUX_THREADS (or
just -DGC_THREADS) and -D_REENTRANT specified in the Makefile.
-3a) Every file that makes thread calls should define GC_LINUX_THREADS and
+3a) Every file that makes thread calls should define GC_LINUX_THREADS and
_REENTRANT and then include gc.h. Gc.h redefines some of the
pthread primitives as macros which also provide the collector with
information it requires.
@@ -38,13 +38,13 @@ To use threads, you need to abide by the following requirements:
with -DGC_USE_LD_WRAP, and to link the final program with
(for ld) --wrap read --wrap dlopen --wrap pthread_create \
- --wrap pthread_join --wrap pthread_detach \
- --wrap pthread_sigmask --wrap sleep
+ --wrap pthread_join --wrap pthread_detach \
+ --wrap pthread_sigmask --wrap pthread_exit --wrap pthread_cancel
(for gcc) -Wl,--wrap -Wl,read -Wl,--wrap -Wl,dlopen -Wl,--wrap \
- -Wl,pthread_create -Wl,--wrap -Wl,pthread_join -Wl,--wrap \
- -Wl,pthread_detach -Wl,--wrap -Wl,pthread_sigmask \
- -Wl,--wrap -Wl,sleep
+ -Wl,pthread_create -Wl,--wrap -Wl,pthread_join -Wl,--wrap \
+ -Wl,pthread_detach -Wl,--wrap -Wl,pthread_sigmask \
+ -Wl,--wrap -Wl,pthread_exit -Wl,--wrap -Wl,pthread_cancel
In any case, _REENTRANT should be defined during compilation.
@@ -75,7 +75,7 @@ patches to correct the problem in 68040 buserror handler but it is not
yet in any standard kernel.
Here is a simple test program to detect whether the kernel has the
-problem. It could be run as a separate check in configure or tested
+problem. It could be run as a separate check in configure or tested
upon startup. If it fails (return !0) than mprotect can't be used
on that system.
@@ -127,5 +127,3 @@ main()
fprintf(stderr,"vmtest Ok\n");
exit(0);
}
-
-