diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-03-06 03:45:10 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-03-06 03:45:10 +0000 |
commit | 9e95ec747bd5526ae9801a58d2b3f668eb215687 (patch) | |
tree | 276482e82f5ee5a3985961afc8244b3120797e9c | |
parent | 808e592e4d32b9d872ef31a315dbdc7ac619e85d (diff) | |
download | ATCD-9e95ec747bd5526ae9801a58d2b3f668eb215687.tar.gz |
ChangeLogTag:Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 6 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 6 | ||||
-rw-r--r-- | ace/Synch_T.h | 12 | ||||
-rw-r--r-- | 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 <schmidt@tango.cs.wustl.edu> + + * ace/Synch_T.{h,i}: Further simplified the new ACE_Guard constructor. + Thanks to Chris Kohlhoff <chris@kohlhoff.com> for contributing + this. + Mon Mar 5 19:20:45 2001 Fuzz Master D <brunsch@uci.edu> * 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 <schmidt@tango.cs.wustl.edu> + + * ace/Synch_T.{h,i}: Further simplified the new ACE_Guard constructor. + Thanks to Chris Kohlhoff <chris@kohlhoff.com> for contributing + this. + Mon Mar 5 19:20:45 2001 Fuzz Master D <brunsch@uci.edu> * 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 <schmidt@tango.cs.wustl.edu> + + * ace/Synch_T.{h,i}: Further simplified the new ACE_Guard constructor. + Thanks to Chris Kohlhoff <chris@kohlhoff.com> for contributing + this. + Mon Mar 5 19:20:45 2001 Fuzz Master D <brunsch@uci.edu> * 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: /// <tryacquire> it. ACE_Guard (ACE_LOCK &l, int block); - // Implicitly and automatically acquire (or try to acquire) the - /// lock. If <become_owner> 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 <become_owner> is -1 then the lock is acquired automatically. - /// If <block> is non-0 then <acquire> the <ACE_LOCK>, else - /// <tryacquire> it. + /// Initialise the guard without implicitly acquiring the lock. The + /// <become_owner> parameter indicates whether the guard should release + /// the lock implicitly on destruction. The <block> 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_LOCK>::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 |