summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl')
-rw-r--r--libpthread/nptl/allocatestack.c6
-rw-r--r--libpthread/nptl/pthread_create.c2
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread.h3
-rw-r--r--libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h1
4 files changed, 5 insertions, 7 deletions
diff --git a/libpthread/nptl/allocatestack.c b/libpthread/nptl/allocatestack.c
index 1e35f48aa..f0acf3b3a 100644
--- a/libpthread/nptl/allocatestack.c
+++ b/libpthread/nptl/allocatestack.c
@@ -34,7 +34,7 @@
#ifndef NEED_SEPARATE_REGISTER_STACK
/* Most architectures have exactly one stack pointer. Some have more. */
-# define STACK_VARIABLES void *stackaddr
+# define STACK_VARIABLES void *stackaddr = 0
/* How to pass the values to the 'create_thread' function. */
# define STACK_VARIABLES_ARGS stackaddr
@@ -53,7 +53,7 @@
/* We need two stacks. The kernel will place them but we have to tell
the kernel about the size of the reserved address space. */
-# define STACK_VARIABLES void *stackaddr; size_t stacksize
+# define STACK_VARIABLES void *stackaddr = 0; size_t stacksize
/* How to pass the values to the 'create_thread' function. */
# define STACK_VARIABLES_ARGS stackaddr, stacksize
@@ -388,7 +388,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
/* Allocate some anonymous memory. If possible use the cache. */
size_t guardsize;
size_t reqsize;
- void *mem;
+ void *mem = 0;
const int prot = (PROT_READ | PROT_WRITE);
#if COLORING_INCREMENT != 0
diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c
index 0b37b3655..81da5b93a 100644
--- a/libpthread/nptl/pthread_create.c
+++ b/libpthread/nptl/pthread_create.c
@@ -349,7 +349,7 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
accessing far-away memory. */
iattr = &default_attr;
- struct pthread *pd;
+ struct pthread *pd = 0;
int err = ALLOCATE_STACK (iattr, &pd);
if (__builtin_expect (err != 0, 0))
/* Something went wrong. Maybe a parameter of the attributes is
diff --git a/libpthread/nptl/sysdeps/pthread/pthread.h b/libpthread/nptl/sysdeps/pthread/pthread.h
index c4bfc0e81..a4a3b3b1d 100644
--- a/libpthread/nptl/sysdeps/pthread/pthread.h
+++ b/libpthread/nptl/sysdeps/pthread/pthread.h
@@ -28,9 +28,6 @@
#include <bits/pthreadtypes.h>
#include <bits/setjmp.h>
#include <bits/wordsize.h>
-#if defined _LIBC && ( defined IS_IN_libc || defined NOT_IN_libc )
-#include <bits/uClibc_pthread.h>
-#endif
/* Detach state. */
diff --git a/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h b/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
index 5cef8b1cf..b9528f363 100644
--- a/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
+++ b/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
@@ -28,4 +28,5 @@
((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
/* We use the normal lobngjmp for unwinding. */
+extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)