projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2007-10-19 Marek Habersack <mhabersack@novell.com>
[mono.git]
/
libgc
/
pthread_support.c
diff --git
a/libgc/pthread_support.c
b/libgc/pthread_support.c
index 0346a8022a6dcff525eb9b899c9ed933ff1c42b2..6306f2cd0ceb244d445e0701e0d8ca2ef01bf71b 100644
(file)
--- a/
libgc/pthread_support.c
+++ b/
libgc/pthread_support.c
@@
-67,8
+67,8
@@
# endif
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
# endif
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
- defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) \
- && !defined(USE_PTHREAD_SPECIFIC)
+ defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS))
||
\
+
defined(GC_NETBSD_THREADS)
&& !defined(USE_PTHREAD_SPECIFIC)
# define USE_PTHREAD_SPECIFIC
# endif
# define USE_PTHREAD_SPECIFIC
# endif
@@
-126,6
+126,11
@@
# include <sys/sysctl.h>
#endif /* GC_DARWIN_THREADS */
# include <sys/sysctl.h>
#endif /* GC_DARWIN_THREADS */
+#if defined(GC_NETBSD_THREADS)
+# include <sys/param.h>
+# include <sys/sysctl.h>
+#endif
+
#if defined(GC_DGUX386_THREADS)
#if defined(GC_DGUX386_THREADS)
@@
-186,7
+191,14
@@
static
GC_key_t GC_thread_key;
#ifdef USE_COMPILER_TLS
GC_key_t GC_thread_key;
#ifdef USE_COMPILER_TLS
-static __thread MONO_TLS_FAST void* GC_thread_tls;
+/*
+ * gcc errors out with /tmp/ccdPMFuq.s:2994: Error: symbol `.LTLS4' is already defined
+ * if the static is removed on ppc.
+ */
+#if defined(__ppc__) || defined(__powerpc__)
+static
+#endif
+__thread MONO_TLS_FAST void* GC_thread_tls;
#endif
static GC_bool keys_initialized;
#endif
static GC_bool keys_initialized;
@@
-1013,7
+1025,7
@@
void GC_thr_init()
GC_nprocs = sysconf(_SC_NPROC_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
GC_nprocs = sysconf(_SC_NPROC_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
-# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS)
+# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS)
|| defined(GC_NETBSD_THREADS)
int ncpus = 1;
size_t len = sizeof(ncpus);
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
int ncpus = 1;
size_t len = sizeof(ncpus);
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);