You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/26 17:05:45 UTC
svn commit: r819147 - in /commons/sandbox/runtime/trunk/src/main/native/os:
darwin/mutex.c unix/mutex.c
Author: mturk
Date: Sat Sep 26 15:05:44 2009
New Revision: 819147
URL: http://svn.apache.org/viewvc?rev=819147&view=rev
Log:
Don't call shmget twice
Modified:
commons/sandbox/runtime/trunk/src/main/native/os/darwin/mutex.c
commons/sandbox/runtime/trunk/src/main/native/os/unix/mutex.c
Modified: commons/sandbox/runtime/trunk/src/main/native/os/darwin/mutex.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/darwin/mutex.c?rev=819147&r1=819146&r2=819147&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/darwin/mutex.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/darwin/mutex.c Sat Sep 26 15:05:44 2009
@@ -402,9 +402,8 @@
goto finally;
}
close(file);
- mfid = semget(mkey, 1, 0);
- if ((mfid = semget(mkey, 1, 0)) < 0) {
+ if ((mfid = semget(mkey, 0, 0)) < 0) {
rc = ACR_GET_OS_ERROR();
goto finally;
}
Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/mutex.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/mutex.c?rev=819147&r1=819146&r2=819147&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/mutex.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/mutex.c Sat Sep 26 15:05:44 2009
@@ -419,9 +419,8 @@
goto finally;
}
close(file);
- mfid = semget(mkey, 1, 0);
- if ((mfid = semget(mkey, 1, 0)) < 0) {
+ if ((mfid = semget(mkey, 0, 0)) < 0) {
rc = ACR_GET_OS_ERROR();
goto finally;
}