From f99de10a1e3bde095ff0d71e46fbc09cdfc49827 Mon Sep 17 00:00:00 2001 From: guenther <> Date: Tue, 5 Apr 2016 04:29:21 +0000 Subject: [PATCH] Prefer _MUTEX_*LOCK over _THREAD_PRIVATE_MUTEX_*LOCK() when thread-specific data isn't necessary. ok mpi@, ok&tweak natano@ --- src/lib/libc/stdlib/random.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/libc/stdlib/random.c b/src/lib/libc/stdlib/random.c index e293648e..41d5f64b 100644 --- a/src/lib/libc/stdlib/random.c +++ b/src/lib/libc/stdlib/random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: random.c,v 1.29 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: random.c,v 1.30 2016/04/05 04:29:21 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. @@ -175,11 +175,11 @@ static int rand_sep = SEP_3; static int random_deterministic; -_THREAD_PRIVATE_MUTEX(random); +static void *random_mutex; static long random_l(void); -#define LOCK() _THREAD_PRIVATE_MUTEX_LOCK(random) -#define UNLOCK() _THREAD_PRIVATE_MUTEX_UNLOCK(random) +#define LOCK() _MUTEX_LOCK(&random_mutex) +#define UNLOCK() _MUTEX_UNLOCK(&random_mutex) /* * srandom: