summaryrefslogtreecommitdiff
path: root/ace/OS.i
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-10-19 06:09:07 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-10-19 06:09:07 +0000
commit3b9397e87c4e4f60c5f8cad5938bf3ea05e1a341 (patch)
treecd6ba39c9fbfda2c5553b73c7b4da994d08a7577 /ace/OS.i
parent45bf0856cf64fae3992caba5963ed74e17fb05dc (diff)
downloadATCD-3b9397e87c4e4f60c5f8cad5938bf3ea05e1a341.tar.gz
ChangeLogTag:Tue Oct 19 00:43:34 1999 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/OS.i')
-rw-r--r--ace/OS.i37
1 files changed, 34 insertions, 3 deletions
diff --git a/ace/OS.i b/ace/OS.i
index ddcd162f245..0a7bb48052e 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -115,7 +115,7 @@ typedef const struct timespec * ACE_TIMESPEC_PTR;
#endif /* ACE_LACKS_MALLOC_H */
ACE_INLINE
-ACE_Errno_Guard::ACE_Errno_Guard (int &errno_ref,
+ACE_Errno_Guard::ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref,
int error)
:
#if defined (ACE_MT_SAFE)
@@ -129,7 +129,7 @@ ACE_Errno_Guard::ACE_Errno_Guard (int &errno_ref,
}
ACE_INLINE
-ACE_Errno_Guard::ACE_Errno_Guard (int &errno_ref)
+ACE_Errno_Guard::ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref)
:
#if defined (ACE_MT_SAFE)
errno_ptr_ (&errno_ref),
@@ -148,6 +148,14 @@ ACE_Errno_Guard::~ACE_Errno_Guard (void)
#endif /* ACE_MT_SAFE */
}
+#if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
+ACE_INLINE int
+ACE_Errno_Guard::operator= (const ACE_ERRNO_TYPE &error)
+{
+ return this->error_ = error;
+}
+#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
+
ACE_INLINE int
ACE_Errno_Guard::operator= (int error)
{
@@ -166,6 +174,29 @@ ACE_Errno_Guard::operator!= (int error)
return this->error_ != error;
}
+#if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
+ACE_INLINE ACE_CE_Errno *
+ACE_CE_Errno::instance ()
+{
+ // This should be inlined.
+ return ACE_CE_Errno::instance_;
+}
+
+ACE_INLINE
+ACE_CE_Errno::operator int (void) const
+{
+ return (int) TlsGetValue (ACE_CE_Errno::errno_key_);
+}
+
+ACE_INLINE int
+ACE_CE_Errno::operator= (int x)
+{
+ // error checking?
+ TlsSetValue (ACE_CE_Errno::errno_key_, (void *) x);
+ return x;
+}
+#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
+
// Returns the value of the object as a timeval.
ACE_INLINE
@@ -4082,7 +4113,7 @@ ACE_OS::rw_unlock (ACE_rwlock_t *rw)
// give preference to writers over readers...
{
result = ACE_OS::cond_signal (&rw->waiting_writers_);
- error = errno;
+ error = errno;
}
else if (rw->num_waiting_readers_ > 0 && rw->num_waiting_writers_ == 0)
{