summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2000-03-22 16:37:49 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2000-03-22 16:37:49 +0000
commit82b90238ff86818269f3aebab6b513d9bc53e57d (patch)
tree751f7bab0fb83824fd60ffd6f0e8ae021e4bf2eb
parentbb56288f76ce4ed463427b10f525fe92b609fe35 (diff)
downloadATCD-82b90238ff86818269f3aebab6b513d9bc53e57d.tar.gz
ChangeLogTag:Wed Mar 22 10:19:47 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLogs/ChangeLog-02a8
-rw-r--r--ChangeLogs/ChangeLog-03a8
-rw-r--r--ace/Thread.i35
4 files changed, 42 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 391b54ead12..0cb576dd0c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Mar 22 10:19:47 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Thread.i: In ACE_Thread::setcancelstate() the code is
+ checking to see if thr_setcancelstate and thr_setcanceltype
+ return 0 and if so returning an error condition to the user.
+ Instead, both of these routines should be checked to see if they
+ return -1 on failure. Thanks to Umar Syyid for reporting this.
+
Wed Mar 22 09:29:09 2000 Chad Elliott <elliott_c@ociweb.com>
* ace/config-chorus.h, ace/ACE.cpp
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 391b54ead12..0cb576dd0c6 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,11 @@
+Wed Mar 22 10:19:47 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Thread.i: In ACE_Thread::setcancelstate() the code is
+ checking to see if thr_setcancelstate and thr_setcanceltype
+ return 0 and if so returning an error condition to the user.
+ Instead, both of these routines should be checked to see if they
+ return -1 on failure. Thanks to Umar Syyid for reporting this.
+
Wed Mar 22 09:29:09 2000 Chad Elliott <elliott_c@ociweb.com>
* ace/config-chorus.h, ace/ACE.cpp
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 391b54ead12..0cb576dd0c6 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,11 @@
+Wed Mar 22 10:19:47 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Thread.i: In ACE_Thread::setcancelstate() the code is
+ checking to see if thr_setcancelstate and thr_setcanceltype
+ return 0 and if so returning an error condition to the user.
+ Instead, both of these routines should be checked to see if they
+ return -1 on failure. Thanks to Umar Syyid for reporting this.
+
Wed Mar 22 09:29:09 2000 Chad Elliott <elliott_c@ociweb.com>
* ace/config-chorus.h, ace/ACE.cpp
diff --git a/ace/Thread.i b/ace/Thread.i
index 103e348fa77..610b84f1ad0 100644
--- a/ace/Thread.i
+++ b/ace/Thread.i
@@ -160,16 +160,17 @@ ACE_Thread::disablecancel (struct cancel_state *old_state)
{
ACE_TRACE ("ACE_Thread::disablecancel");
int old_cstate = 0;
- int retval;
- if ((retval = ACE_OS::thr_setcancelstate (THR_CANCEL_DISABLE,
- &old_cstate)) == 0)
- if (old_state != 0)
+ int result = ACE_OS::thr_setcancelstate (THR_CANCEL_DISABLE,
+ &old_cstate);
+ if (result == 0 && old_state != 0)
{
- ACE_OS::memset (old_state, 0, sizeof(old_state));
+ ACE_OS::memset (old_state,
+ 0,
+ sizeof (old_state));
old_state->cancelstate = old_cstate;
}
- return retval;
+ return result;
}
ACE_INLINE int
@@ -179,17 +180,17 @@ ACE_Thread::enablecancel (struct cancel_state *old_state,
ACE_TRACE ("ACE_Thread::enablecancel");
int old_cstate = 0;
int old_ctype = 0;
- int retval;
-
- retval = ACE_OS::thr_setcancelstate (THR_CANCEL_ENABLE, &old_cstate);
-
- if (retval != 0)
- return retval;
+ int result;
- retval = ACE_OS::thr_setcanceltype (flag, &old_ctype);
+ result = ACE_OS::thr_setcancelstate (THR_CANCEL_ENABLE,
+ &old_cstate);
+ if (result != 0)
+ return result;
- if (retval != 0)
- return retval;
+ result = ACE_OS::thr_setcanceltype (flag,
+ &old_ctype);
+ if (result != 0)
+ return result;
if (old_state != 0)
{
@@ -210,12 +211,12 @@ ACE_Thread::setcancelstate (struct cancel_state &new_state,
if (new_state.cancelstate != 0
&& ACE_OS::thr_setcancelstate (new_state.cancelstate,
- &old_cstate) == 0)
+ &old_cstate) != 0)
return -1;
if (new_state.canceltype != 0
&& ACE_OS::thr_setcanceltype (new_state.canceltype,
- &old_ctype) == 0)
+ &old_ctype) != 0)
{
int o_cstate;