diff options
author | 2008-01-01 00:43:39 +0000 | |
---|---|---|
committer | 2008-01-01 00:43:39 +0000 | |
commit | 229f4f6ee4c7ecffe38220a1baa321e3465d69d6 (patch) | |
tree | 8958250da2db5f655350d351427431e7df1af2e8 /lib/libpthread/uthread | |
parent | fix name (diff) | |
download | wireguard-openbsd-229f4f6ee4c7ecffe38220a1baa321e3465d69d6.tar.xz wireguard-openbsd-229f4f6ee4c7ecffe38220a1baa321e3465d69d6.zip |
- make arc4random*() functions thread safe. Use a custom spinlock function
instead of the generic pthread macros since free(3) uses __arc4_getbyte()
when freeing small sized allocations and the generic pthread macros call
malloc(3).
- eliminate passing pointers to a static variable with global scope (rs)
for additional code clarity and reduction.
- shlib minor bumps for libc and libpthread due to new functions.
From andreas@ with some bits from me. okay tedu@ marc@ w/some spot
checking from millert@
Diffstat (limited to 'lib/libpthread/uthread')
-rw-r--r-- | lib/libpthread/uthread/uthread_init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/uthread_init.c b/lib/libpthread/uthread/uthread_init.c index d48e1173566..36559a5ae34 100644 --- a/lib/libpthread/uthread/uthread_init.c +++ b/lib/libpthread/uthread/uthread_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_init.c,v 1.40 2007/07/20 22:34:40 kettenis Exp $ */ +/* $OpenBSD: uthread_init.c,v 1.41 2008/01/01 00:43:39 kurt Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -135,6 +135,8 @@ static void *references[] = { &_thread_malloc_unlock, &_thread_atexit_lock, &_thread_atexit_unlock, + &_thread_arc4_lock, + &_thread_arc4_unlock, &_thread_tag_lock, &_thread_tag_unlock, &_thread_tag_storage, |