2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 ACE_INLINE const ACE_sema_t &
5 ACE_Semaphore::lock (void) const
7 // ACE_TRACE ("ACE_Semaphore::lock");
8 return this->semaphore_;
12 ACE_Semaphore::remove (void)
14 // ACE_TRACE ("ACE_Semaphore::remove");
18 this->removed_ = true;
19 result = ACE_OS::sema_destroy (&this->semaphore_);
25 ACE_Semaphore::acquire (void)
27 // ACE_TRACE ("ACE_Semaphore::acquire");
28 return ACE_OS::sema_wait (&this->semaphore_);
32 ACE_Semaphore::acquire (ACE_Time_Value &tv)
34 // ACE_TRACE ("ACE_Semaphore::acquire");
35 return ACE_OS::sema_wait (&this->semaphore_, tv);
39 ACE_Semaphore::acquire (ACE_Time_Value *tv)
41 // ACE_TRACE ("ACE_Semaphore::acquire");
42 return ACE_OS::sema_wait (&this->semaphore_, tv);
46 ACE_Semaphore::tryacquire (void)
48 // ACE_TRACE ("ACE_Semaphore::tryacquire");
49 return ACE_OS::sema_trywait (&this->semaphore_);
53 ACE_Semaphore::release (void)
55 // ACE_TRACE ("ACE_Semaphore::release");
56 return ACE_OS::sema_post (&this->semaphore_);
60 ACE_Semaphore::release (unsigned int release_count)
62 // ACE_TRACE ("ACE_Semaphore::release");
63 return ACE_OS::sema_post (&this->semaphore_, release_count);
66 // Acquire semaphore ownership. This calls <acquire> and is only
67 // here to make the <ACE_Semaphore> interface consistent with the
68 // other synchronization APIs.
71 ACE_Semaphore::acquire_read (void)
73 return this->acquire ();
76 // Acquire semaphore ownership. This calls <acquire> and is only
77 // here to make the <ACE_Semaphore> interface consistent with the
78 // other synchronization APIs.
81 ACE_Semaphore::acquire_write (void)
83 return this->acquire ();
86 // Conditionally acquire semaphore (i.e., won't block). This calls
87 // <tryacquire> and is only here to make the <ACE_Semaphore>
88 // interface consistent with the other synchronization APIs.
91 ACE_Semaphore::tryacquire_read (void)
93 return this->tryacquire ();
96 // Conditionally acquire semaphore (i.e., won't block). This calls
97 // <tryacquire> and is only here to make the <ACE_Semaphore>
98 // interface consistent with the other synchronization APIs.
101 ACE_Semaphore::tryacquire_write (void)
103 return this->tryacquire ();
106 // This is only here to make the <ACE_Semaphore> interface consistent
107 // with the other synchronization APIs. Assumes the caller has
108 // already acquired the semaphore using one of the above calls, and
109 // returns 0 (success) always.
111 ACE_Semaphore::tryacquire_write_upgrade (void)
116 ACE_END_VERSIONED_NAMESPACE_DECL