diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-09-01 21:07:37 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-09-01 21:07:37 +0000 |
commit | cb24396bcc30f69f1314cb695c8bd5a48908063c (patch) | |
tree | f07bdcdbacdbdb97452166659baabcb9a9717919 /ace/SV_Semaphore_Complex.cpp | |
parent | 06bdf7583baa87668223157b5b5eef210ecf1fcc (diff) | |
download | ATCD-cb24396bcc30f69f1314cb695c8bd5a48908063c.tar.gz |
ChangeLogTag:Wed Sep 1 15:51:41 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'ace/SV_Semaphore_Complex.cpp')
-rw-r--r-- | ace/SV_Semaphore_Complex.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ace/SV_Semaphore_Complex.cpp b/ace/SV_Semaphore_Complex.cpp index a269c5319c5..9b062b466a2 100644 --- a/ace/SV_Semaphore_Complex.cpp +++ b/ace/SV_Semaphore_Complex.cpp @@ -85,23 +85,24 @@ ACE_SV_Semaphore_Complex::open (key_t k, { this->internal_id_ = ACE_OS::semget (this->key_, - (u_short) 2 + nsems, perms | ACE_SV_Semaphore_Complex::ACE_CREATE); + (u_short) 2 + nsems, + perms | ACE_SV_Semaphore_Complex::ACE_CREATE); if (this->internal_id_ == -1) return -1; // permission problem or tables full - // When the ACE_SV_Semaphore is created, we know that the - // value of all 3 members is 0. Get a lock on the - // ACE_SV_Semaphore by waiting for [0] to equal 0, then - // increment it. + // When the <ACE_SV_Semaphore_Complex> is created, we know + // that the value of all 3 members is 0. Get a lock on the + // <ACE_SV_Semaphore_Complex> by waiting for [0] to equal 0, + // then increment it. // There is a race condition here. There is the possibility - // that between the semget() above and the semop() below, - // another process can call out close() function which can - // remove the ACE_SV_Semaphore if that process is the last + // that between the <semget> above and the <semop> below, + // another process can call out <close> function which can + // remove the <ACE_SV_Semaphore> if that process is the last // one using it. Therefor we handle the error condition of - // an invalid ACE_SV_Semaphore ID specifically below, and if - // it does happen, we just go back and create it again. + // an invalid <ACE_SV_Semaphore> ID specifically below, and + // if it does happen, we just go back and create it again. result = ACE_OS::semop (this->internal_id_, &ACE_SV_Semaphore_Complex::op_lock_[0], 2); |