summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2015-08-25 13:46:23 +0000
committerpooka <pooka@NetBSD.org>2015-08-25 13:46:23 +0000
commit0b89fc75bc88e2fe01b8ac58c799f65ebca29b9c (patch)
tree97599f60abe4862bbabb30e76ae4cb3a3df3e255 /lib
parentf7b3a29b910329c923a1480018c23e66f482a20d (diff)
Revert 1.14 now that the arduous task of fixing rumphijack to allow
mmap() in early init has been completed.
Diffstat (limited to 'lib')
-rw-r--r--lib/libpthread/pthread_tsd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libpthread/pthread_tsd.c b/lib/libpthread/pthread_tsd.c
index 2075444e8db..baceae9c967 100644
--- a/lib/libpthread/pthread_tsd.c
+++ b/lib/libpthread/pthread_tsd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_tsd.c,v 1.14 2015/05/30 14:42:26 christos Exp $ */
+/* $NetBSD: pthread_tsd.c,v 1.15 2015/08/25 13:46:23 pooka Exp $ */
/*-
* Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_tsd.c,v 1.14 2015/05/30 14:42:26 christos Exp $");
+__RCSID("$NetBSD: pthread_tsd.c,v 1.15 2015/08/25 13:46:23 pooka Exp $");
/* Functions and structures dealing with thread-specific data */
#include <errno.h>
@@ -60,9 +60,6 @@ null_destructor(void *p)
#include <stdlib.h>
#include <stdio.h>
-/* Can't use mmap directly so early in the process because rump hijacks it */
-void *_mmap(void *, size_t, int, int, int, off_t);
-
void *
pthread_tsd_init(size_t *tlen)
{
@@ -88,7 +85,7 @@ pthread_tsd_init(size_t *tlen)
+ sizeof(*pthread__tsd_list) * pthread_keys_max
+ sizeof(*pthread__tsd_destructors) * pthread_keys_max;
- arena = _mmap(NULL, alen, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
+ arena = mmap(NULL, alen, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
if (arena == MAP_FAILED) {
pthread_keys_max = 0;
return NULL;