summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/env/__init_tls.c1
-rw-r--r--src/errno/__errno_location.c2
-rw-r--r--src/internal/pthread_impl.h2
-rw-r--r--src/thread/pthread_create.c1
4 files changed, 2 insertions, 4 deletions
diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c
index e1a2b614..f7eab8d6 100644
--- a/src/env/__init_tls.c
+++ b/src/env/__init_tls.c
@@ -16,7 +16,6 @@ int __init_tp(void *p)
if (!r) libc.can_do_threads = 1;
libc.has_thread_pointer = 1;
td->tid = td->pid = __syscall(SYS_set_tid_address, &td->tid);
- td->errno_ptr = &td->errno_val;
return 0;
}
diff --git a/src/errno/__errno_location.c b/src/errno/__errno_location.c
index 84191076..49654efd 100644
--- a/src/errno/__errno_location.c
+++ b/src/errno/__errno_location.c
@@ -3,6 +3,6 @@
int *__errno_location(void)
{
static int e;
- if (libc.has_thread_pointer) return __pthread_self()->errno_ptr;
+ if (libc.has_thread_pointer) return &__pthread_self()->errno_val;
return &e;
}
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
index 2e910b3e..650e8115 100644
--- a/src/internal/pthread_impl.h
+++ b/src/internal/pthread_impl.h
@@ -18,7 +18,7 @@ struct pthread {
uintptr_t sysinfo;
uintptr_t canary;
pid_t tid, pid;
- int tsd_used, errno_val, *errno_ptr;
+ int tsd_used, errno_val;
volatile int cancel, canceldisable, cancelasync;
int detached;
unsigned char *map_base;
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 7a2f172c..e9c8160a 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -201,7 +201,6 @@ int pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict attrp
new->stack = stack;
new->stack_size = stack - stack_limit;
new->pid = self->pid;
- new->errno_ptr = &new->errno_val;
new->start = entry;
new->start_arg = arg;
new->self = new;