2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 #if !defined (_ACE_USE_SV_SEM)
5 ACE_INLINE const ACE_mutex_t &
6 ACE_Process_Mutex::lock () const
8 // ACE_TRACE ("ACE_Process_Mutex::lock");
9 return this->lock_.lock ();
11 #endif /* !_ACE_USE_SV_SEM */
13 // Explicitly destroy the mutex.
15 ACE_Process_Mutex::remove ()
17 return this->lock_.remove ();
20 // Acquire lock ownership (wait on priority queue if necessary).
22 ACE_Process_Mutex::acquire ()
24 #if defined (_ACE_USE_SV_SEM)
25 return this->lock_.acquire (0, SEM_UNDO);
27 return this->lock_.acquire ();
28 #endif // _ACE_USE_SV_SEM
31 // Acquire lock ownership (wait on priority queue if necessary).
33 ACE_Process_Mutex::acquire (ACE_Time_Value &tv)
35 #if !defined (_ACE_USE_SV_SEM)
36 return this->lock_.acquire (tv);
39 ACE_NOTSUP_RETURN (-1);
40 #endif /* !_ACE_USE_SV_SEM */
43 // Conditionally acquire lock (i.e., don't wait on queue).
45 ACE_Process_Mutex::tryacquire ()
47 #if defined (_ACE_USE_SV_SEM)
48 return this->lock_.tryacquire (0, SEM_UNDO);
50 return this->lock_.tryacquire ();
51 #endif // _ACE_USE_SV_SEM
54 // Release lock and unblock a thread at head of priority queue.
56 ACE_Process_Mutex::release ()
58 #if defined (_ACE_USE_SV_SEM)
59 return this->lock_.release (0, SEM_UNDO);
61 return this->lock_.release ();
62 #endif // _ACE_USE_SV_SEM
65 // Acquire lock ownership (wait on priority queue if necessary).
67 ACE_Process_Mutex::acquire_read ()
69 #if defined (_ACE_USE_SV_SEM)
70 return this->lock_.acquire_read (0, SEM_UNDO);
72 return this->lock_.acquire_read ();
73 #endif // _ACE_USE_SV_SEM
76 // Acquire lock ownership (wait on priority queue if necessary).
78 ACE_Process_Mutex::acquire_write ()
80 #if defined (_ACE_USE_SV_SEM)
81 return this->lock_.acquire_write (0, SEM_UNDO);
83 return this->lock_.acquire_write ();
84 #endif // _ACE_USE_SV_SEM
87 // Conditionally acquire a lock (i.e., won't block).
89 ACE_Process_Mutex::tryacquire_read ()
91 #if defined (_ACE_USE_SV_SEM)
92 return this->lock_.tryacquire_read (0, SEM_UNDO);
94 return this->lock_.tryacquire_read ();
95 #endif // _ACE_USE_SV_SEM
98 // Conditionally acquire a lock (i.e., won't block).
100 ACE_Process_Mutex::tryacquire_write ()
102 #if defined (_ACE_USE_SV_SEM)
103 return this->lock_.tryacquire_write (0, SEM_UNDO);
105 return this->lock_.tryacquire_write ();
106 #endif // _ACE_USE_SV_SEM
110 ACE_Process_Mutex::tryacquire_write_upgrade ()
115 ACE_INLINE const ACE_TCHAR *
116 ACE_Process_Mutex::name () const
118 #if defined _ACE_USE_SV_SEM || !defined ACE_MUTEX_USE_PROCESS_LOCK
121 return this->lock_.lockname_;
125 ACE_END_VERSIONED_NAMESPACE_DECL