summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-02-14 03:45:13 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-02-14 03:45:13 +0000
commitf0b061523e4bdcae5ac51fec47d5f65f665dfdf9 (patch)
tree428c3543a836ca2f96048719c1c2ef3a3282039f
parent562cfc9230f80a6deae45605c99870e34e9ca38f (diff)
downloadATCD-f0b061523e4bdcae5ac51fec47d5f65f665dfdf9.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-97a13
-rw-r--r--ace/OS.i2
-rw-r--r--ace/Synch.cpp29
-rw-r--r--examples/Threads/tss1.cpp2
4 files changed, 27 insertions, 19 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a
index 452d2e419e6..bff681bda09 100644
--- a/ChangeLog-97a
+++ b/ChangeLog-97a
@@ -1,3 +1,16 @@
+Thu Feb 13 21:24:17 1997 <irfan@cha-cha.cs.wustl.edu>
+
+ * ace/OS.i (event_wait): Fixed the missing check for success.
+
+ * ace/Synch: Fixed problems with multiple removal of
+ resources. Thanks to Bert (Bcraytor@aol.com) for pointing this
+ out.
+
+ * examples/Threads/test.{mdp,mak}: Reorganized project so that it
+ is easier to use.
+
+ * examples/Threads: Small changes to make tests run faster.
+
Thu Feb 13 01:49:38 1997 Irfan Pyarali <irfan@flamenco.cs.wustl.edu>
* ace/OS.i (stat): Added stat() to ACE_OS.
diff --git a/ace/OS.i b/ace/OS.i
index 9054c9fb318..0644da3f697 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -2041,6 +2041,8 @@ ACE_OS::event_wait (ACE_event_t *event)
#if defined (ACE_WIN32)
switch (::WaitForSingleObject (*event, INFINITE))
{
+ case WAIT_OBJECT_0:
+ return 0;
case WAIT_ABANDONED:
errno = WAIT_ABANDONED;
return -1;
diff --git a/ace/Synch.cpp b/ace/Synch.cpp
index c2d980601af..e2a38fdd5ec 100644
--- a/ace/Synch.cpp
+++ b/ace/Synch.cpp
@@ -27,7 +27,7 @@ ACE_TSS_Adapter::ACE_TSS_Adapter (void *object, ACE_THR_DEST f)
void
ACE_TSS_Adapter::cleanup (void)
{
- // ACE_TRACE ("ACE_TSS_Adapter::~ACE_TSS_Adapter");
+ // ACE_TRACE ("ACE_TSS_Adapter::cleanup");
(*this->func_)(this->ts_obj_); // call cleanup routine for ts_obj_
}
@@ -153,14 +153,13 @@ ACE_RW_Mutex::ACE_RW_Mutex (int type, LPCTSTR name, void *arg)
{
// ACE_TRACE ("ACE_RW_Mutex::ACE_RW_Mutex");
if (ACE_OS::rwlock_init (&this->lock_, type, name, arg) != 0)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_RW_Mutex::~ACE_RW_Mutex"));
+ ACE_ERROR ((LM_ERROR, "%p\n", "ACE_RW_Mutex::ACE_RW_Mutex"));
}
ACE_RW_Mutex::~ACE_RW_Mutex (void)
{
// ACE_TRACE ("ACE_RW_Mutex::~ACE_RW_Mutex");
- if (this->remove () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_RW_Mutex::~ACE_RW_Mutex"));
+ this->remove ();
}
ACE_ALLOC_HOOK_DEFINE(ACE_Semaphore)
@@ -190,8 +189,7 @@ ACE_Semaphore::ACE_Semaphore (u_int count,
ACE_Semaphore::~ACE_Semaphore (void)
{
// ACE_TRACE ("ACE_Semaphore::~ACE_Semaphore");
- if (this->remove () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Semaphore_Mutex::~ACE_Semaphore_Mutex"));
+ this->remove ();
}
void
@@ -225,8 +223,7 @@ ACE_File_Lock::ACE_File_Lock (LPCTSTR name,
ACE_File_Lock::~ACE_File_Lock (void)
{
// ACE_TRACE ("ACE_File_Lock::~ACE_File_Lock");
- if (this->remove () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_File_Lock::~ACE_File_Lock"));
+ this->remove ();
}
void
@@ -322,8 +319,7 @@ ACE_Mutex::ACE_Mutex (int type, LPCTSTR name, void *arg)
ACE_Mutex::~ACE_Mutex (void)
{
// ACE_TRACE ("ACE_Mutex::~ACE_Mutex");
- if (this->remove () != 0)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Mutex::~ACE_Mutex"));
+ this->remove ();
}
ACE_Event::ACE_Event (int manual_reset,
@@ -343,8 +339,7 @@ ACE_Event::ACE_Event (int manual_reset,
ACE_Event::~ACE_Event (void)
{
- if (this->remove () != 0)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Event::~ACE_Event"));
+ this->remove ();
}
int
@@ -504,9 +499,7 @@ ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (LPCTSTR name,
ACE_Recursive_Thread_Mutex::~ACE_Recursive_Thread_Mutex (void)
{
-// ACE_TRACE ("ACE_Recursive_Thread_Mutex::~ACE_Recursive_Thread_Mutex");
- if (this->remove () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Process_Mutex::~ACE_Process_Mutex"));
+ // ACE_TRACE ("ACE_Recursive_Thread_Mutex::~ACE_Recursive_Thread_Mutex");
}
int
@@ -655,8 +648,7 @@ ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &
ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex (void)
{
// ACE_TRACE ("ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex");
- if (this->remove () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex"));
+ this->remove ();
}
// Peform an "alertable" timed wait. If the argument <abstime> == 0
@@ -861,8 +853,7 @@ ACE_Thread_Mutex::dump (void) const
ACE_Thread_Mutex::~ACE_Thread_Mutex (void)
{
// ACE_TRACE ("ACE_Thread_Mutex::~ACE_Thread_Mutex");
- if (this->remove () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Thread_Mutex::~ACE_Thread_Mutex"));
+ this->remove ();
}
ACE_Thread_Mutex::ACE_Thread_Mutex (LPCTSTR name, void *arg)
diff --git a/examples/Threads/tss1.cpp b/examples/Threads/tss1.cpp
index 307ae9e1020..c0cc38bbc3e 100644
--- a/examples/Threads/tss1.cpp
+++ b/examples/Threads/tss1.cpp
@@ -114,6 +114,8 @@ Tester<ACE_SYNCH_2>::svc (void)
if ((i % 10) == 1)
ACE_DEBUG ((LM_DEBUG, "(%t) error = %d\n", TSS_Error->error ()));
+ this->close ();
+
return 0;
}