summaryrefslogtreecommitdiff
path: root/usr/src/lib/libproc/common/Pcontrol.c
diff options
context:
space:
mode:
authorraf <none@none>2007-03-20 17:29:57 -0700
committerraf <none@none>2007-03-20 17:29:57 -0700
commitcb6207858a9fcc2feaee22e626912fba281ac969 (patch)
tree9e84b682e42e9c8dcd013b29690be6905e45841d /usr/src/lib/libproc/common/Pcontrol.c
parentd7306b64c847d897abb9ece8624fca9cf28d358f (diff)
downloadillumos-gate-cb6207858a9fcc2feaee22e626912fba281ac969.tar.gz
PSARC 2007/129 thr_keycreate_once
6513516 double checked locking code needs a memory barrier
Diffstat (limited to 'usr/src/lib/libproc/common/Pcontrol.c')
-rw-r--r--usr/src/lib/libproc/common/Pcontrol.c4
1 files changed, 3 insertions, 1 deletions
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 <dirent.h>
#include <limits.h>
#include <signal.h>
+#include <atomic.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/stat.h>
@@ -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);