From cb6207858a9fcc2feaee22e626912fba281ac969 Mon Sep 17 00:00:00 2001 From: raf Date: Tue, 20 Mar 2007 17:29:57 -0700 Subject: PSARC 2007/129 thr_keycreate_once 6513516 double checked locking code needs a memory barrier --- usr/src/lib/libproc/common/Pcontrol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr/src/lib/libproc/common/Pcontrol.c') diff --git a/usr/src/lib/libproc/common/Pcontrol.c b/usr/src/lib/libproc/common/Pcontrol.c index e30d5758cb..6cf0c45891 100644 --- a/usr/src/lib/libproc/common/Pcontrol.c +++ b/usr/src/lib/libproc/common/Pcontrol.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -125,6 +126,7 @@ set_minfd(void) fd = 256; else if ((fd = rlim.rlim_cur / 2) < 3) fd = 3; + membar_producer(); minfd = fd; } (void) mutex_unlock(&minfd_lock); -- cgit v1.2.3