summaryrefslogtreecommitdiff
path: root/ace/SV_Semaphore_Complex.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-11-19 14:42:22 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-11-19 14:42:22 +0000
commit535b599b586d8ce66f8adc38edd655863a3d78d6 (patch)
tree1059bd668648c459c5ce80051cac523cb8469b91 /ace/SV_Semaphore_Complex.cpp
parentbd3041aa6c617c5b7ca57b659f94dc363f0497bd (diff)
downloadATCD-535b599b586d8ce66f8adc38edd655863a3d78d6.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/SV_Semaphore_Complex.cpp')
-rw-r--r--ace/SV_Semaphore_Complex.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/ace/SV_Semaphore_Complex.cpp b/ace/SV_Semaphore_Complex.cpp
index 5ab615707b3..178b8f0c595 100644
--- a/ace/SV_Semaphore_Complex.cpp
+++ b/ace/SV_Semaphore_Complex.cpp
@@ -67,6 +67,10 @@ ACE_SV_Semaphore_Complex::open (key_t k,
this->key_ = k;
+ // Must include a count for the 2 additional semaphores we use
+ // internally.
+ this->sem_number_ = nsems + 2;
+
if (create == ACE_SV_Semaphore_Complex::ACE_CREATE)
{
int result;
@@ -74,7 +78,8 @@ ACE_SV_Semaphore_Complex::open (key_t k,
do
{
this->internal_id_ = ACE_OS::semget
- (this->key_, (u_short) 2 + nsems, perms | ACE_SV_Semaphore_Complex::ACE_CREATE);
+ (this->key_,
+ (u_short) 2 + nsems, perms | ACE_SV_Semaphore_Complex::ACE_CREATE);
if (this->internal_id_ == -1)
return -1; // permission problem or tables full