summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-09-05 16:05:56 +0000
committeroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-09-05 16:05:56 +0000
commit7a923c931d3870e888598d00782eb8d3f8240f60 (patch)
treee968251fb8ef94831a8bbb5b766b903b85e09f2e
parentfcf03baff2fd2b42673eb2a79ed75097e05c00cc (diff)
downloadATCD-7a923c931d3870e888598d00782eb8d3f8240f60.tar.gz
ChangeLogTag: Tue Sep 5 10:51:53 2000 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a10
-rw-r--r--TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.cpp41
-rw-r--r--TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.i40
-rw-r--r--TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp61
-rw-r--r--TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.i60
5 files changed, 112 insertions, 100 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index df6c3ee0cfa..2f1ab2811b9 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,13 @@
+Tue Sep 5 10:51:53 2000 Chad Elliott <elliott_c@ociweb.com>
+
+ * orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.cpp
+ * orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.i
+ * orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp
+ * orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.i
+
+ Moved some methods from inline to the .cpp. This is a workaround
+ for the SunCC 4.2 Compiler patch level 104631-07.
+
Mon Sep 4 22:18:16 2000 Marina Spivak <marina@cs.wustl.edu>
* tao/Stub.cpp:
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.cpp b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.cpp
index 2fd79e01133..e33d420177f 100644
--- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.cpp
+++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.cpp
@@ -78,4 +78,45 @@ TAO_ESF_Copy_On_Read<PROXY,COLLECTION,ITERATOR,ACE_LOCK>::
ACE_ENDTRY;
}
+template<class PROXY, class C, class I, class L> void
+TAO_ESF_Copy_On_Read<PROXY,C,I,L>::
+ connected (PROXY *proxy,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ ACE_GUARD (L, ace_mon, this->lock_);
+
+ proxy->_incr_refcnt ();
+ this->collection_.connected (proxy, ACE_TRY_ENV);
+}
+
+template<class PROXY, class C, class I, class L> void
+TAO_ESF_Copy_On_Read<PROXY,C,I,L>::
+ reconnected (PROXY *proxy,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ ACE_GUARD (L, ace_mon, this->lock_);
+
+ proxy->_incr_refcnt ();
+ this->collection_.reconnected (proxy, ACE_TRY_ENV);
+}
+
+template<class PROXY, class C, class I, class L> void
+TAO_ESF_Copy_On_Read<PROXY,C,I,L>::
+ disconnected (PROXY *proxy,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ ACE_GUARD (L, ace_mon, this->lock_);
+
+ this->collection_.disconnected (proxy, ACE_TRY_ENV);
+}
+
+template<class PROXY, class C, class I, class L> void
+TAO_ESF_Copy_On_Read<PROXY,C,I,L>::
+ shutdown (CORBA::Environment &ACE_TRY_ENV)
+{
+ ACE_GUARD (L, ace_mon, this->lock_);
+
+ this->collection_.shutdown (ACE_TRY_ENV);
+}
+
#endif /* TAO_ESF_COPY_ON_READ_CPP */
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.i b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.i
index ba1cbb48e25..74e88caa0c5 100644
--- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.i
+++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Read.i
@@ -1,42 +1,2 @@
// $Id$
-template<class PROXY, class C, class I, class L> void
-TAO_ESF_Copy_On_Read<PROXY,C,I,L>::
- connected (PROXY *proxy,
- CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_GUARD (L, ace_mon, this->lock_);
-
- proxy->_incr_refcnt ();
- this->collection_.connected (proxy, ACE_TRY_ENV);
-}
-
-template<class PROXY, class C, class I, class L> void
-TAO_ESF_Copy_On_Read<PROXY,C,I,L>::
- reconnected (PROXY *proxy,
- CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_GUARD (L, ace_mon, this->lock_);
-
- proxy->_incr_refcnt ();
- this->collection_.reconnected (proxy, ACE_TRY_ENV);
-}
-
-template<class PROXY, class C, class I, class L> void
-TAO_ESF_Copy_On_Read<PROXY,C,I,L>::
- disconnected (PROXY *proxy,
- CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_GUARD (L, ace_mon, this->lock_);
-
- this->collection_.disconnected (proxy, ACE_TRY_ENV);
-}
-
-template<class PROXY, class C, class I, class L> void
-TAO_ESF_Copy_On_Read<PROXY,C,I,L>::
- shutdown (CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_GUARD (L, ace_mon, this->lock_);
-
- this->collection_.shutdown (ACE_TRY_ENV);
-}
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp
index f2f32b69fcc..d3d33f744a8 100644
--- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp
+++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp
@@ -137,6 +137,67 @@ TAO_ESF_Copy_On_Write<PROXY,C,I,ACE_SYNCH_USE>::
ace_mon.copy->collection.shutdown (ACE_TRY_ENV);
}
+template<class COLLECTION, class ITERATOR, ACE_SYNCH_DECL>
+TAO_ESF_Copy_On_Write_Write_Guard<COLLECTION,ITERATOR,ACE_SYNCH_USE>::
+ TAO_ESF_Copy_On_Write_Write_Guard (ACE_SYNCH_MUTEX_T &m,
+ ACE_SYNCH_CONDITION_T &c,
+ int &p,
+ int &w,
+ Collection*& cr)
+ : copy (0),
+ mutex (m),
+ cond (c),
+ pending_writes (p),
+ writing_flag (w),
+ collection (cr)
+{
+ {
+ ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->mutex);
+
+ this->pending_writes++;
+
+ while (this->writing_flag != 0)
+ this->cond.wait ();
+
+ this->writing_flag = 1;
+ }
+
+ // Copy outside the mutex, because it may take a long time.
+ // Nobody can change it, because it is protected by the
+ // writing_flag.
+
+ // First initialize it (with the correct reference count
+ ACE_NEW (this->copy, Collection);
+ // Copy the contents
+ this->copy->collection = this->collection->collection;
+
+ // Increase the reference counts
+ ITERATOR end = this->copy->collection.end ();
+ for (ITERATOR i = this->copy->collection.begin (); i != end; ++i)
+ {
+ (*i)->_incr_refcnt ();
+ }
+}
+
+template<class COLLECTION, class ITERATOR, ACE_SYNCH_DECL>
+TAO_ESF_Copy_On_Write_Write_Guard<COLLECTION,ITERATOR,ACE_SYNCH_USE>::
+ ~TAO_ESF_Copy_On_Write_Write_Guard (void)
+{
+ Collection *tmp = 0;
+ {
+ ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->mutex);
+
+ tmp = this->collection;
+ this->collection = this->copy;
+ this->writing_flag = 0;
+ this->pending_writes--;
+
+ this->cond.signal ();
+ }
+ // Delete outside the mutex, because it may take a long time.
+ tmp->_decr_refcnt ();
+}
+
// ****************************************************************
#endif /* TAO_ESF_COPY_ON_WRITE_CPP */
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.i b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.i
index 12f8525ba09..e4aff9e9491 100644
--- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.i
+++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.i
@@ -34,63 +34,3 @@ TAO_ESF_Copy_On_Write_Read_Guard<COLLECTION,ITERATOR,ACE_LOCK>::
// ****************************************************************
-template<class COLLECTION, class ITERATOR, ACE_SYNCH_DECL> ACE_INLINE
-TAO_ESF_Copy_On_Write_Write_Guard<COLLECTION,ITERATOR,ACE_SYNCH_USE>::
- TAO_ESF_Copy_On_Write_Write_Guard (ACE_SYNCH_MUTEX_T &m,
- ACE_SYNCH_CONDITION_T &c,
- int &p,
- int &w,
- Collection*& cr)
- : copy (0),
- mutex (m),
- cond (c),
- pending_writes (p),
- writing_flag (w),
- collection (cr)
-{
- {
- ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->mutex);
-
- this->pending_writes++;
-
- while (this->writing_flag != 0)
- this->cond.wait ();
-
- this->writing_flag = 1;
- }
-
- // Copy outside the mutex, because it may take a long time.
- // Nobody can change it, because it is protected by the
- // writing_flag.
-
- // First initialize it (with the correct reference count
- ACE_NEW (this->copy, Collection);
- // Copy the contents
- this->copy->collection = this->collection->collection;
-
- // Increase the reference counts
- ITERATOR end = this->copy->collection.end ();
- for (ITERATOR i = this->copy->collection.begin (); i != end; ++i)
- {
- (*i)->_incr_refcnt ();
- }
-}
-
-template<class COLLECTION, class ITERATOR, ACE_SYNCH_DECL> ACE_INLINE
-TAO_ESF_Copy_On_Write_Write_Guard<COLLECTION,ITERATOR,ACE_SYNCH_USE>::
- ~TAO_ESF_Copy_On_Write_Write_Guard (void)
-{
- Collection *tmp = 0;
- {
- ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->mutex);
-
- tmp = this->collection;
- this->collection = this->copy;
- this->writing_flag = 0;
- this->pending_writes--;
-
- this->cond.signal ();
- }
- // Delete outside the mutex, because it may take a long time.
- tmp->_decr_refcnt ();
-}