summary refs log tree commit diff
path: root/linuxthreads/pthread.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-16 22:26:45 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-16 22:26:45 +0000
commita66f0958a1fbe5d64c3c77c01baee10bf23257dd (patch)
tree8bd667d88be5d0697fbcd2c01292b538abf5b91b /linuxthreads/pthread.c
parentaeba9785a6e2e8dca120bb0b62b74ea1eda0a4a8 (diff)
downloadglibc-a66f0958a1fbe5d64c3c77c01baee10bf23257dd.tar.gz
glibc-a66f0958a1fbe5d64c3c77c01baee10bf23257dd.tar.xz
glibc-a66f0958a1fbe5d64c3c77c01baee10bf23257dd.zip
Update.
2001-03-16  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/ieee754/ldbl-96/s_erfl.c: New file.
	Contributed by Stephen L. Moshier <moshier@na-net.ornl.gov>.

	* sysdeps/i386/fpu/libm-test-ulps: Adjust for addition of erfl and
	erfcl.
	* sysdeps/ia64/fpu/libm-test-ulps: Likewise.

	* sysdeps/unix/sysv/linux/ia64/swapcontext.c: New file.
Diffstat (limited to 'linuxthreads/pthread.c')
-rw-r--r--linuxthreads/pthread.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 5a2ade7446..b1c6186683 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -456,19 +456,10 @@ void __pthread_initialize(void)
   pthread_initialize();
 }
 
-int __pthread_initialize_manager(void)
+void __pthread_init_max_stacksize(void)
 {
-  int manager_pipe[2];
-  int pid;
-  struct pthread_request request;
   struct rlimit limit;
-  int max_stack;
-
-#ifndef HAVE_Z_NODELETE
-  if (__builtin_expect (&__dso_handle != NULL, 1))
-    __cxa_atexit ((void (*) (void *)) pthread_atexit_retcode, NULL,
-		  __dso_handle);
-#endif
+  size_t max_stack;
 
   getrlimit(RLIMIT_STACK, &limit);
 #ifdef FLOATING_STACKS
@@ -478,9 +469,7 @@ int __pthread_initialize_manager(void)
   max_stack = limit.rlim_cur / 2;
 # else
   max_stack = limit.rlim_cur;
-#endif
-
-  __pthread_max_stacksize = max_stack;
+# endif
 #else
   /* Play with the stack size limit to make sure that no stack ever grows
      beyond STACK_SIZE minus one page (to act as a guard page). */
@@ -496,6 +485,23 @@ int __pthread_initialize_manager(void)
     setrlimit(RLIMIT_STACK, &limit);
   }
 #endif
+  __pthread_max_stacksize = max_stack;
+}
+
+int __pthread_initialize_manager(void)
+{
+  int manager_pipe[2];
+  int pid;
+  struct pthread_request request;
+
+#ifndef HAVE_Z_NODELETE
+  if (__builtin_expect (&amp;__dso_handle != NULL, 1))
+    __cxa_atexit ((void (*) (void *)) pthread_atexit_retcode, NULL,
+		  __dso_handle);
+#endif
+
+  if (__pthread_max_stacksize == 0)
+    __pthread_init_max_stacksize ();
   /* If basic initialization not done yet (e.g. we're called from a
      constructor run before our constructor), do it now */
   if (__pthread_initial_thread_bos == NULL) pthread_initialize();