diff options
author | kobica <kobica@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-03-08 16:53:54 +0000 |
---|---|---|
committer | kobica <kobica@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-03-08 16:53:54 +0000 |
commit | 5de492391e3664595135301e81ea758983d1f461 (patch) | |
tree | 137abde19afefeee05cc4108fa4c033424d80d6b /ace/Process_Mutex.inl | |
parent | 5bc12cc859559ca4652ea260d5d170fac3e9183e (diff) | |
download | ATCD-5de492391e3664595135301e81ea758983d1f461.tar.gz |
ChangeLogTag: Mon Mar 8 18:34:09 2004 Kobi Cohen-Arazi <kobi-co@barak-online.net>
Diffstat (limited to 'ace/Process_Mutex.inl')
-rw-r--r-- | ace/Process_Mutex.inl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ace/Process_Mutex.inl b/ace/Process_Mutex.inl index 14c0af99e42..bf2c8c29ef6 100644 --- a/ace/Process_Mutex.inl +++ b/ace/Process_Mutex.inl @@ -21,7 +21,11 @@ ACE_Process_Mutex::remove (void) ACE_INLINE int ACE_Process_Mutex::acquire (void) { +#if defined (_ACE_USE_SV_SEM) + return this->lock_.acquire (0, SEM_UNDO); +#else return this->lock_.acquire (); +#endif // _ACE_USE_SV_SEM } // Acquire lock ownership (wait on priority queue if necessary). @@ -40,42 +44,66 @@ ACE_Process_Mutex::acquire (ACE_Time_Value &tv) ACE_INLINE int ACE_Process_Mutex::tryacquire (void) { +#if defined (_ACE_USE_SV_SEM) + return this->lock_.tryacquire (0, SEM_UNDO); +#else return this->lock_.tryacquire (); +#endif // _ACE_USE_SV_SEM } // Release lock and unblock a thread at head of priority queue. ACE_INLINE int ACE_Process_Mutex::release (void) { +#if defined (_ACE_USE_SV_SEM) + return this->lock_.release (0, SEM_UNDO); +#else return this->lock_.release (); +#endif // _ACE_USE_SV_SEM } // Acquire lock ownership (wait on priority queue if necessary). ACE_INLINE int ACE_Process_Mutex::acquire_read (void) { +#if defined (_ACE_USE_SV_SEM) + return this->lock_.acquire_read (0, SEM_UNDO); +#else return this->lock_.acquire_read (); +#endif // _ACE_USE_SV_SEM } // Acquire lock ownership (wait on priority queue if necessary). ACE_INLINE int ACE_Process_Mutex::acquire_write (void) { +#if defined (_ACE_USE_SV_SEM) + return this->lock_.acquire_write (0, SEM_UNDO); +#else return this->lock_.acquire_write (); +#endif // _ACE_USE_SV_SEM } // Conditionally acquire a lock (i.e., won't block). ACE_INLINE int ACE_Process_Mutex::tryacquire_read (void) { +#if defined (_ACE_USE_SV_SEM) + return this->lock_.tryacquire_read (0, SEM_UNDO); +#else return this->lock_.tryacquire_read (); +#endif // _ACE_USE_SV_SEM } // Conditionally acquire a lock (i.e., won't block). ACE_INLINE int ACE_Process_Mutex::tryacquire_write (void) { +#if defined (_ACE_USE_SV_SEM) + return this->lock_.tryacquire_write (0, SEM_UNDO); +#else return this->lock_.tryacquire_write (); +#endif // _ACE_USE_SV_SEM } ACE_INLINE int |