diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-03-05 22:57:42 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-03-05 22:57:42 +0000 |
commit | 30313a1d5903835cb8eb0e89a199b0c75cb24d6c (patch) | |
tree | c7e24338d23bb63d6846efd216053c0770d1b8e5 | |
parent | c0de7f37da69affec1703ea95f0be2c8f800c88e (diff) | |
download | ATCD-30313a1d5903835cb8eb0e89a199b0c75cb24d6c.tar.gz |
ChangeLogTag:Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 5 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 5 | ||||
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | ace/Synch_T.h | 7 | ||||
-rw-r--r-- | ace/Synch_T.i | 4 |
6 files changed, 22 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index bb7fbca3a9a..a270eccfea6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + * ace/Synch_T.{h,i}: Added a new ACE_Guard constructor that + allows the caller to select whether the guard owns/acquires the + lock or not. Thanks to Chris Kohlhoff <chris@kohlhoff.com> for + contributing this. + * ace/Synch_T.{h,i}: Added a disown() method that relinquishes ownership of the lock so that it is not released implicitly in the destructor. Thanks to Chris Kohlhoff <chris@kohlhoff.com> diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index bb7fbca3a9a..a270eccfea6 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,5 +1,10 @@ Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + * ace/Synch_T.{h,i}: Added a new ACE_Guard constructor that + allows the caller to select whether the guard owns/acquires the + lock or not. Thanks to Chris Kohlhoff <chris@kohlhoff.com> for + contributing this. + * ace/Synch_T.{h,i}: Added a disown() method that relinquishes ownership of the lock so that it is not released implicitly in the destructor. Thanks to Chris Kohlhoff <chris@kohlhoff.com> diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index bb7fbca3a9a..a270eccfea6 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,5 +1,10 @@ Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + * ace/Synch_T.{h,i}: Added a new ACE_Guard constructor that + allows the caller to select whether the guard owns/acquires the + lock or not. Thanks to Chris Kohlhoff <chris@kohlhoff.com> for + contributing this. + * ace/Synch_T.{h,i}: Added a disown() method that relinquishes ownership of the lock so that it is not released implicitly in the destructor. Thanks to Chris Kohlhoff <chris@kohlhoff.com> @@ -1166,6 +1166,7 @@ John Mackenzie <John.Mackenzie.extern@icn.siemens.de> Ricky Marek <ricky@waveip.com> Patrick Maassen <patrick.maassen@meco.nl> Christian Schuhegger <Christian.Schuhegger@cern.ch> +David L Smith <david.l.smith@larc.nasa.gov> I would particularly like to thank Paul Stephenson, who worked with me at Ericsson in the early 1990's. Paul devised the recursive Makefile diff --git a/ace/Synch_T.h b/ace/Synch_T.h index 71279c6fbed..f70d39bf9e0 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -430,10 +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 then initialize the guard without - /// automatically acquiring the lock; this parameter simply indicates + // 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. ACE_Guard (ACE_LOCK &l, int block, int become_owner); diff --git a/ace/Synch_T.i b/ace/Synch_T.i index 2bce599f097..f5902c7975e 100644 --- a/ace/Synch_T.i +++ b/ace/Synch_T.i @@ -49,9 +49,9 @@ ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l, int block) template <class ACE_LOCK> ACE_INLINE ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l, int block, int become_owner) : lock_ (&l), - owner_ (0) + owner_ (become_owner == 0 ? -1 : 0) { - if (become_owner) + if (become_owner == -1) { if (block) this->acquire (); |