summaryrefslogtreecommitdiffstats
path: root/lib/librthread/rthread.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2016-09-01 10:41:02 +0000
committerotto <otto@openbsd.org>2016-09-01 10:41:02 +0000
commitca609fedb3fd4858a72ea88c8ada5319b57e8bd9 (patch)
tree872a70745e6f18c07e2ef6dd37ccb0a1163460a0 /lib/librthread/rthread.c
parentDo not busy loop in the rsa engine callback waiting for the ca. Instead use (diff)
downloadwireguard-openbsd-ca609fedb3fd4858a72ea88c8ada5319b57e8bd9.tar.xz
wireguard-openbsd-ca609fedb3fd4858a72ea88c8ada5319b57e8bd9.zip
Less lock contention by using more pools for mult-threaded programs.
tested by many (thanks!) ok tedu, guenther@
Diffstat (limited to 'lib/librthread/rthread.c')
-rw-r--r--lib/librthread/rthread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/librthread/rthread.c b/lib/librthread/rthread.c
index b7e82feabc7..399f42cb48d 100644
--- a/lib/librthread/rthread.c
+++ b/lib/librthread/rthread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread.c,v 1.91 2016/05/07 19:05:22 guenther Exp $ */
+/* $OpenBSD: rthread.c,v 1.92 2016/09/01 10:41:02 otto Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -38,6 +38,7 @@
#include <pthread.h>
#include "cancel.h" /* in libc/include */
+#include "thread_private.h"
#include "rthread.h"
#include "rthread_cb.h"
@@ -247,6 +248,8 @@ _rthread_init(void)
_threads_ready = 1;
+ _malloc_init(1);
+
_rthread_debug(1, "rthread init\n");
}