about summary refs log tree commit diff
path: root/linuxthreads/pthread.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-04 00:22:32 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-04 00:22:32 +0000
commit4ad1d0cfbf96c3dbcf0ba104eb9f81bae6bdc6da (patch)
treee9cd4db68a06582802d945faf432460e54ceea82 /linuxthreads/pthread.c
parent68eefde7b626b57d5fde40980084feda77c89801 (diff)
downloadglibc-4ad1d0cfbf96c3dbcf0ba104eb9f81bae6bdc6da.tar.gz
glibc-4ad1d0cfbf96c3dbcf0ba104eb9f81bae6bdc6da.tar.xz
glibc-4ad1d0cfbf96c3dbcf0ba104eb9f81bae6bdc6da.zip
(charmap_read): Prepend the condition filename == NULL.
Diffstat (limited to 'linuxthreads/pthread.c')
-rw-r--r--linuxthreads/pthread.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 1e650f4e46..a3f829f9ac 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -150,7 +150,7 @@ pthread_descr __pthread_main_thread = &__pthread_initial_thread;
 /* Limit between the stack of the initial thread (above) and the
    stacks of other threads (below). Aligned on a STACK_SIZE boundary. */
 
-char *__pthread_initial_thread_bos = NULL;
+char *__pthread_initial_thread_bos;
 
 /* File descriptor for sending requests to the thread manager. */
 /* Initially -1, meaning that the thread manager is not running. */
@@ -163,13 +163,17 @@ int __pthread_manager_reader;
 
 /* Limits of the thread manager stack */
 
-char *__pthread_manager_thread_bos = NULL;
-char *__pthread_manager_thread_tos = NULL;
+char *__pthread_manager_thread_bos;
+char *__pthread_manager_thread_tos;
 
 /* For process-wide exit() */
 
-int __pthread_exit_requested = 0;
-int __pthread_exit_code = 0;
+int __pthread_exit_requested;
+int __pthread_exit_code;
+
+/* Nozero if the machine has more than one processor.  */
+int __pthread_smp_kernel;
+
 
 #if !__ASSUME_REALTIME_SIGNALS
 /* Pointers that select new or old suspend/resume functions
@@ -212,7 +216,7 @@ static int current_rtmin = -1;
 static int current_rtmax = -1;
 int __pthread_sig_restart = SIGUSR1;
 int __pthread_sig_cancel = SIGUSR2;
-int __pthread_sig_debug = 0;
+int __pthread_sig_debug;
 #else
 static int current_rtmin;
 static int current_rtmax;
@@ -224,7 +228,7 @@ int __pthread_sig_debug = __SIGRTMIN + 2;
 #else
 int __pthread_sig_restart = SIGUSR1;
 int __pthread_sig_cancel = SIGUSR2;
-int __pthread_sig_debug = 0;
+int __pthread_sig_debug;
 #endif
 
 static int rtsigs_initialized;
@@ -399,6 +403,8 @@ static void pthread_initialize(void)
     __cxa_atexit((void (*) (void *)) pthread_exit_process, NULL, __dso_handle);
   else
     __on_exit (pthread_exit_process, NULL);
+  /* How many processors.  */
+  __pthread_smp_kernel = sysconf (_SC_NPROCESSORS_ONLN) > 1;
 }
 
 void __pthread_initialize(void)