From 9e95ec747bd5526ae9801a58d2b3f668eb215687 Mon Sep 17 00:00:00 2001 From: schmidt Date: Tue, 6 Mar 2001 03:45:10 +0000 Subject: ChangeLogTag:Mon Mar 5 13:56:33 2001 Douglas C. Schmidt --- ChangeLog | 6 ++++++ ChangeLogs/ChangeLog-02a | 6 ++++++ ChangeLogs/ChangeLog-03a | 6 ++++++ ace/Synch_T.h | 12 +++++------- ace/Synch_T.i | 8 +------- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8aa5a39116..b6952fc6c28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Mar 5 13:56:33 2001 Douglas C. Schmidt + + * ace/Synch_T.{h,i}: Further simplified the new ACE_Guard constructor. + Thanks to Chris Kohlhoff for contributing + this. + Mon Mar 5 19:20:45 2001 Fuzz Master D * bin/fuzz.pl: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index f8aa5a39116..b6952fc6c28 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,9 @@ +Mon Mar 5 13:56:33 2001 Douglas C. Schmidt + + * ace/Synch_T.{h,i}: Further simplified the new ACE_Guard constructor. + Thanks to Chris Kohlhoff for contributing + this. + Mon Mar 5 19:20:45 2001 Fuzz Master D * bin/fuzz.pl: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index f8aa5a39116..b6952fc6c28 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,9 @@ +Mon Mar 5 13:56:33 2001 Douglas C. Schmidt + + * ace/Synch_T.{h,i}: Further simplified the new ACE_Guard constructor. + Thanks to Chris Kohlhoff for contributing + this. + Mon Mar 5 19:20:45 2001 Fuzz Master D * bin/fuzz.pl: diff --git a/ace/Synch_T.h b/ace/Synch_T.h index f70d39bf9e0..821372c4b66 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -430,13 +430,11 @@ public: /// it. ACE_Guard (ACE_LOCK &l, int block); - // Implicitly and automatically acquire (or try to acquire) the - /// lock. If is 0 or 1 then initialize the guard without - /// automatically acquiring the lock; this parameter then indicates - /// whether the guard should release the lock implicitly on destruction. - /// If is -1 then the lock is acquired automatically. - /// If is non-0 then the , else - /// it. + /// Initialise the guard without implicitly acquiring the lock. The + /// parameter indicates whether the guard should release + /// the lock implicitly on destruction. The parameter is + /// ignored and is used here to disambiguate with the preceding + /// constructor. ACE_Guard (ACE_LOCK &l, int block, int become_owner); /// Implicitly release the lock. diff --git a/ace/Synch_T.i b/ace/Synch_T.i index f5902c7975e..deeb7b5eb5d 100644 --- a/ace/Synch_T.i +++ b/ace/Synch_T.i @@ -51,13 +51,7 @@ ACE_Guard::ACE_Guard (ACE_LOCK &l, int block, int become_owner) : lock_ (&l), owner_ (become_owner == 0 ? -1 : 0) { - if (become_owner == -1) - { - if (block) - this->acquire (); - else - this->tryacquire (); - } + ACE_UNUSED_ARG (block); } // Implicitly and automatically acquire (or try to acquire) the -- cgit v1.2.1