#ifdef GC_SOLARIS_THREADS
# include <sys/syscall.h>
#endif
+
#if defined(MSWIN32) || defined(MSWINCE) \
|| (defined(CYGWIN32) && defined(GC_READ_ENV_FILE))
# ifndef WIN32_LEAN_AND_MEAN
#endif /* !GC_GET_HEAP_USAGE_NOT_NEEDED */
-#if defined(GC_DARWIN_THREADS) || defined(GC_OPENBSD_THREADS) \
+#if defined(GC_DARWIN_THREADS) || defined(GC_OPENBSD_UTHREADS) \
|| defined(GC_WIN32_THREADS) || (defined(NACL) && defined(THREADS))
/* GC does not use signals to suspend and restart threads. */
GC_API void GC_CALL GC_set_suspend_signal(int sig GC_ATTR_UNUSED)
int GC_nacl_thread_parked[MAX_NACL_GC_THREADS];
int GC_nacl_thread_used[MAX_NACL_GC_THREADS];
-#elif defined(GC_OPENBSD_THREADS)
+#elif defined(GC_OPENBSD_UTHREADS)
# include <pthread_np.h>
-#else /* !GC_OPENBSD_THREADS && !NACL */
+#else /* !GC_OPENBSD_UTHREADS && !NACL */
#include <signal.h>
#include <semaphore.h>
# endif
}
-#endif /* !GC_OPENBSD_THREADS && !NACL */
+#endif /* !GC_OPENBSD_UTHREADS && !NACL */
#ifdef IA64
# define IF_IA64(x) x
# ifndef NACL
GC_thread p;
-# ifndef GC_OPENBSD_THREADS
+# ifndef GC_OPENBSD_UTHREADS
int result;
# endif
pthread_t self = pthread_self();
if (!THREAD_EQUAL(p -> id, self)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) /* Will wait */ continue;
-# ifndef GC_OPENBSD_THREADS
+# ifndef GC_OPENBSD_UTHREADS
if (p -> stop_info.last_stop_count == GC_stop_count) continue;
n_live_threads++;
# endif
GC_log_printf("Sending suspend signal to %p\n", (void *)p->id);
# endif
-# ifdef GC_OPENBSD_THREADS
+# ifdef GC_OPENBSD_UTHREADS
{
stack_t stack;
if (pthread_suspend_np(p -> id) != 0)
GC_INNER void GC_stop_world(void)
{
-# if !defined(GC_OPENBSD_THREADS) && !defined(NACL)
+# if !defined(GC_OPENBSD_UTHREADS) && !defined(NACL)
int i;
int n_live_threads;
int code;
}
# endif /* PARALLEL_MARK */
-# if defined(GC_OPENBSD_THREADS) || defined(NACL)
+# if defined(GC_OPENBSD_UTHREADS) || defined(NACL)
(void)GC_suspend_all();
# else
AO_store(&GC_stop_count, GC_stop_count+1);
pthread_t self = pthread_self();
register int i;
register GC_thread p;
-# ifndef GC_OPENBSD_THREADS
+# ifndef GC_OPENBSD_UTHREADS
register int n_live_threads = 0;
register int result;
# endif
GC_log_printf("World starting\n");
# endif
-# ifndef GC_OPENBSD_THREADS
+# ifndef GC_OPENBSD_UTHREADS
AO_store(&GC_world_is_stopped, FALSE);
# endif
for (i = 0; i < THREAD_TABLE_SZ; i++) {
if (!THREAD_EQUAL(p -> id, self)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) continue;
-# ifndef GC_OPENBSD_THREADS
+# ifndef GC_OPENBSD_UTHREADS
n_live_threads++;
# endif
# ifdef DEBUG_THREADS
GC_log_printf("Sending restart signal to %p\n", (void *)p->id);
# endif
-# ifdef GC_OPENBSD_THREADS
+# ifdef GC_OPENBSD_UTHREADS
if (pthread_resume_np(p -> id) != 0)
ABORT("pthread_resume_np failed");
# else
GC_INNER void GC_stop_init(void)
{
-# if !defined(GC_OPENBSD_THREADS) && !defined(NACL)
+# if !defined(GC_OPENBSD_UTHREADS) && !defined(NACL)
struct sigaction act;
if (sem_init(&GC_suspend_ack_sem, GC_SEM_INIT_PSHARED, 0) != 0)
if (GC_retry_signals) {
GC_COND_LOG_PRINTF("Will retry suspend signal if necessary\n");
}
-# endif /* !GC_OPENBSD_THREADS && !NACL */
+# endif /* !GC_OPENBSD_UTHREADS && !NACL */
}
#endif /* GC_PTHREADS && !GC_DARWIN_THREADS && !GC_WIN32_THREADS */