summaryrefslogtreecommitdiff
path: root/ace/OS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/OS.cpp')
-rw-r--r--ace/OS.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp
index b5fef535e14..425bcad3dbf 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -5244,12 +5244,12 @@ ACE_OS::rwlock_init (ACE_rwlock_t *rw,
if (result == -1)
{
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
+ int error = errno;
ACE_OS::mutex_destroy (&rw->lock_);
ACE_OS::cond_destroy (&rw->waiting_readers_);
ACE_OS::cond_destroy (&rw->waiting_writers_);
ACE_OS::cond_destroy (&rw->waiting_important_writer_);
+ errno = error;
}
return result;
# else
@@ -5498,7 +5498,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv,
ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
int result = 0;
- ACE_Errno_Guard error (errno, 0);
+ int error = 0;
int msec_timeout;
if (timeout->sec () == 0 && timeout->usec () == 0)
@@ -5648,6 +5648,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv,
// occur because that's the guarantee that we give to our callers.
ACE_OS::mutex_lock (external_mutex);
+ errno = error;
return result;
# endif /* ACE_HAS_WTHREADS || ACE_HAS_VXWORKS || ACE_PSOS */
# else