summaryrefslogtreecommitdiff
path: root/pthread_support.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-08-14 13:52:06 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:54 +0200
commit26220af2e4a3aef3ffb8c006cd197a8987107dff (patch)
tree70f378d2f6f7e9710619c44b919a9194e2185a1c /pthread_support.c
parent24a998358610e865d9d98f8fff83dc7330a1dd18 (diff)
2010-08-14 Ivan Maidanski <ivmai@mail.ru>
* dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer for 64-bit targets. * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE macro. * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS() since REAL(pthread_create) is used. * pthread_support.c (PTHREAD_CREATE): Remove unused.
Diffstat (limited to 'pthread_support.c')
-rw-r--r--pthread_support.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pthread_support.c b/pthread_support.c
index 0c89466..87bb09b 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -353,13 +353,14 @@ STATIC void * GC_mark_thread(void * id)
STATIC pthread_t GC_mark_threads[MAX_MARKERS];
-#define PTHREAD_CREATE REAL_FUNC(pthread_create)
-
static void start_mark_threads(void)
{
unsigned i;
pthread_attr_t attr;
+ GC_ASSERT(I_DONT_HOLD_LOCK());
+ INIT_REAL_SYMS(); /* for pthread_create */
+
if (0 != pthread_attr_init(&attr)) ABORT("pthread_attr_init failed");
if (0 != pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))
@@ -383,7 +384,7 @@ static void start_mark_threads(void)
}
# endif /* HPUX || GC_DGUX386_THREADS */
for (i = 0; i < GC_markers - 1; ++i) {
- if (0 != PTHREAD_CREATE(GC_mark_threads + i, &attr,
+ if (0 != REAL_FUNC(pthread_create)(GC_mark_threads + i, &attr,
GC_mark_thread, (void *)(word)i)) {
WARN("Marker thread creation failed, errno = %" GC_PRIdPTR "\n",
errno);