summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-03-17 13:56:27 +0000
committerErmal <eri@pfsense.org>2010-03-17 13:56:27 +0000
commit2ae24c22b8cadc261721425c629a10b604f5070e (patch)
tree970c7c80ede348b196311a605b2f84f59366c329 /etc/inc/util.inc
parentf19651d15bd752943444f80b038d86bcb7be23e3 (diff)
downloadpfsense-2ae24c22b8cadc261721425c629a10b604f5070e.zip
pfsense-2ae24c22b8cadc261721425c629a10b604f5070e.tar.gz
Generalize.
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 76dba77..81051f3 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -143,13 +143,13 @@ function unlock($cfglckkey = 0) {
}
function refcount_init($reference) {
- $shmid = shmop_open(1000, "c", 0644, 10);
+ $shmid = shmop_open($reference, "c", 0644, 10);
shmop_write($shmid, 0, 0);
shmop_close($shmid);
}
function refcount_reference($reference) {
- $shmid = shmop_open(1000, "w", 0644, 10);
+ $shmid = shmop_open($reference, "w", 0644, 10);
$shm_data = shmop_read($shmid, 0, 10);
$shm_data = intval($shm_data) + 1;
shmop_write($shmid, $shm_data, 0);
@@ -160,7 +160,7 @@ function refcount_reference($reference) {
function refcount_unreference($reference) {
/* We assume that the shared memory exists. */
- $shmid = shmop_open(1000, "w", 0644, 10);
+ $shmid = shmop_open($reference, "w", 0644, 10);
$shm_data = shmop_read($shmid, 0, 10);
$shm_data = intval($shm_data) - 1;
if ($shm_data < 0) {
OpenPOWER on IntegriCloud