summaryrefslogtreecommitdiff
path: root/pthread_support.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-08-14 15:59:21 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:54 +0200
commite61fa5f9f270db9073abef2fc2bf573657b246e1 (patch)
treed1d0383f2585c74763a5298a4222e0369f6fe6ae /pthread_support.c
parent26220af2e4a3aef3ffb8c006cd197a8987107dff (diff)
2010-08-14 Ivan Maidanski <ivmai@mail.ru>
* os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless pages_executable is on. * os_dep.c (os2_alloc): Add FIXME (for recursion). * os_dep.c (UNPROTECT): Abort with a more informative message if pages_executable is on ("mprotect" case). * os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if pages_executable is on (Darwin case). * pthread_support.c (GC_init_real_syms): Abort with an informative message if libgc is linked after libpthread.
Diffstat (limited to 'pthread_support.c')
-rw-r--r--pthread_support.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pthread_support.c b/pthread_support.c
index 87bb09b..95fa15e 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -231,6 +231,11 @@ GC_INNER unsigned long GC_lock_holder = NO_THREAD;
# endif
REAL_FUNC(pthread_create) = (GC_pthread_create_t)
dlsym(dl_handle, "pthread_create");
+# ifdef RTLD_NEXT
+ if (REAL_FUNC(pthread_create) == 0)
+ ABORT("pthread_create not found"
+ " (probably -lgc is specified after -lpthread)");
+# endif
REAL_FUNC(pthread_sigmask) = (GC_pthread_sigmask_t)
dlsym(dl_handle, "pthread_sigmask");
REAL_FUNC(pthread_join) = (GC_pthread_join_t)