diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-07-31 21:43:34 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-07-31 21:43:34 +0000 |
commit | 067759cfa82dad47abbed189774df163177044dd (patch) | |
tree | 4fb1e4e192938516d59154cd95f85b10805e1c15 | |
parent | 3b9db2963b36796cdb81ef938fcb573ad724f763 (diff) | |
download | ATCD-067759cfa82dad47abbed189774df163177044dd.tar.gz |
*** empty log message ***
-rw-r--r-- | ace/Synch.h | 4 | ||||
-rw-r--r-- | ace/Synch.i | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ace/Synch.h b/ace/Synch.h index c8bc1c3931d..0415cce6cd4 100644 --- a/ace/Synch.h +++ b/ace/Synch.h @@ -183,6 +183,10 @@ public: // Block the thread until the semaphore count becomes // greater than 0, then decrement it. + int acquire (ACE_Time_Value &tv); + // Block the thread until <tv> times out or until the semaphore + // count becomes greater than 0 (at which point it is decremented). + int tryacquire (void); // Conditionally decrement the semaphore if count is greater than 0 // (i.e., won't block). diff --git a/ace/Synch.i b/ace/Synch.i index 6884ef25880..905f7048820 100644 --- a/ace/Synch.i +++ b/ace/Synch.i @@ -222,6 +222,13 @@ ACE_Semaphore::acquire (void) } ACE_INLINE int +ACE_Semaphore::acquire (ACE_Time_Value &tv) +{ +// ACE_TRACE ("ACE_Semaphore::acquire"); + return ACE_OS::sema_wait (&this->semaphore_, tv); +} + +ACE_INLINE int ACE_Semaphore::tryacquire (void) { // ACE_TRACE ("ACE_Semaphore::tryacquire"); |