summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpoberlin <poberlin@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-07-28 20:11:41 +0000
committerpoberlin <poberlin@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-07-28 20:11:41 +0000
commit094071160db60f18ec07fba8fd3ca3bb4a10860b (patch)
tree9e0d270445bcc0880b6feaf0edffb53f732f9273
parent6a2af6a42cffb50fd0baa533382d570e43ad2df8 (diff)
downloadATCD-094071160db60f18ec07fba8fd3ca3bb4a10860b.tar.gz
checking in g++ compilation
-rw-r--r--ACE/ace/Basic_P_Strategy.cpp3
-rw-r--r--ACE/ace/Basic_P_Strategy.h3
-rw-r--r--ACE/ace/Basic_P_Strategy.inl4
-rw-r--r--ACE/ace/DA_Strategy_Base.h3
-rw-r--r--ACE/ace/Efficient_P_Strategy.inl4
-rw-r--r--ACE/ace/Live_P_Strategy.inl26
-rw-r--r--ACE/ace/ace.mpc17
-rw-r--r--ACE/ace/k_Efficient_P_Strategy.inl8
-rw-r--r--ACE/tests/tests.mpc8
9 files changed, 55 insertions, 21 deletions
diff --git a/ACE/ace/Basic_P_Strategy.cpp b/ACE/ace/Basic_P_Strategy.cpp
index 02e6df1d6f7..3db49ae73eb 100644
--- a/ACE/ace/Basic_P_Strategy.cpp
+++ b/ACE/ace/Basic_P_Strategy.cpp
@@ -2,4 +2,5 @@
#if !defined (__ACE_INLINE__)
#include "ace/Basic_P_Strategy.inl"
-#endif /* __ACE_INLINE__ */ \ No newline at end of file
+#endif /* __ACE_INLINE__ */
+
diff --git a/ACE/ace/Basic_P_Strategy.h b/ACE/ace/Basic_P_Strategy.h
index f374b2616c9..5bd14d409e4 100644
--- a/ACE/ace/Basic_P_Strategy.h
+++ b/ACE/ace/Basic_P_Strategy.h
@@ -43,4 +43,5 @@ private:
#include /**/ "ace/post.h"
-#endif /* ACE_BASIC_P_STRATEGY_H */ \ No newline at end of file
+#endif /* ACE_BASIC_P_STRATEGY_H */
+
diff --git a/ACE/ace/Basic_P_Strategy.inl b/ACE/ace/Basic_P_Strategy.inl
index b6a8dba546c..67290328c14 100644
--- a/ACE/ace/Basic_P_Strategy.inl
+++ b/ACE/ace/Basic_P_Strategy.inl
@@ -2,7 +2,7 @@
template <typename AnnotationId>
ACE_INLINE
Basic_P_Strategy<AnnotationId>::Basic_P_Strategy(int maxThreads)
-:DA_Strategy_Base(maxThreads),
+:DA_Strategy_Base<AnnotationId>(maxThreads),
t_r(maxThreads)
{
}
@@ -34,4 +34,4 @@ ACE_INLINE
void Basic_P_Strategy<AnnotationId>::release(AnnotationId upcall_handle)
{
++t_r;
-} \ No newline at end of file
+}
diff --git a/ACE/ace/DA_Strategy_Base.h b/ACE/ace/DA_Strategy_Base.h
index 2b566d9b35c..c2cc5b32c8e 100644
--- a/ACE/ace/DA_Strategy_Base.h
+++ b/ACE/ace/DA_Strategy_Base.h
@@ -91,4 +91,5 @@ private:
#include /**/ "ace/post.h"
-#endif /* DA_STRATEGY_BASE_H */ \ No newline at end of file
+#endif /* DA_STRATEGY_BASE_H */
+
diff --git a/ACE/ace/Efficient_P_Strategy.inl b/ACE/ace/Efficient_P_Strategy.inl
index fdd6b76468d..3520b5d5a70 100644
--- a/ACE/ace/Efficient_P_Strategy.inl
+++ b/ACE/ace/Efficient_P_Strategy.inl
@@ -2,7 +2,7 @@
template <typename AnnotationId>
ACE_INLINE
Efficient_P_Strategy<AnnotationId>::Efficient_P_Strategy(int maxThreads)
-:DA_Strategy_Base(maxThreads),
+:DA_Strategy_Base<AnnotationId>(maxThreads),
t_r(maxThreads),
p_r(maxThreads),
_lock()
@@ -58,4 +58,4 @@ Efficient_P_Strategy<AnnotationId>::release(AnnotationId upcall_handle)
p_r ++;
}
}
-} \ No newline at end of file
+}
diff --git a/ACE/ace/Live_P_Strategy.inl b/ACE/ace/Live_P_Strategy.inl
index 641a50e70f6..7de17dd2eee 100644
--- a/ACE/ace/Live_P_Strategy.inl
+++ b/ACE/ace/Live_P_Strategy.inl
@@ -34,7 +34,7 @@ private:
void recalculate_augmentation(ACE_RB_Tree_Node<int, AnnotationNode>* nodePtr);
void recalculate_augmentation_up(ACE_RB_Tree_Node<int, AnnotationNode>* x);
int calc_max_i(ACE_RB_Tree_Node<int, AnnotationNode>* nodePtr, int extra) const;
- static int MIN(int a, int b) { return (a<b)?a:b; }
+ //static int MIN(int a, int b) { return (a<b)?a:b; }
static int MIN_THREE(int a, int b, int c) {
return (a<b)?MIN(a,c):MIN(b,c);
}
@@ -43,7 +43,7 @@ private:
ACE_INLINE
Live_P_Tree::Live_P_Tree(int maxThreads)
-:ACE_RB_Tree(),
+:ACE_RB_Tree<int, AnnotationNode, ACE_Equal_To<int>, ACE_Thread_Mutex>(),
T_(maxThreads) {
}
@@ -65,7 +65,12 @@ Live_P_Tree::bind(const int& ext_id)
if (entry && result == EXACT) {
entry->item().count++;
} else {
- returnVal = ACE_RB_Tree::bind(ext_id, AnnotationNode(), entry);
+ returnVal = ACE_RB_Tree<int,
+ AnnotationNode,
+ ACE_Equal_To<int>,
+ ACE_Thread_Mutex>::bind(ext_id,
+ AnnotationNode(),
+ entry);
}
recalculate_augmentation_up(entry);
return returnVal;
@@ -74,7 +79,7 @@ Live_P_Tree::bind(const int& ext_id)
void
Live_P_Tree::RB_rotate_right (ACE_RB_Tree_Node<int, AnnotationNode> *x)
{
- ACE_RB_Tree::RB_rotate_right(x);
+ ACE_RB_Tree<int, AnnotationNode, ACE_Equal_To<int>, ACE_Thread_Mutex>::RB_rotate_right(x);
recalculate_augmentation_up(x);
}
@@ -82,7 +87,7 @@ Live_P_Tree::RB_rotate_right (ACE_RB_Tree_Node<int, AnnotationNode> *x)
void
Live_P_Tree::RB_rotate_left (ACE_RB_Tree_Node<int, AnnotationNode> *x)
{
- ACE_RB_Tree::RB_rotate_left(x);
+ ACE_RB_Tree<int, AnnotationNode, ACE_Equal_To<int>, ACE_Thread_Mutex>::RB_rotate_left(x);
recalculate_augmentation_up(x);
}
@@ -99,7 +104,7 @@ Live_P_Tree::unbind(const int& ext_id)
if (entry && result == EXACT) {
if (--(entry->item().count) == 0) {
entry = entry->parent();
- returnVal = ACE_RB_Tree::unbind(ext_id);
+ returnVal = ACE_RB_Tree<int, AnnotationNode, ACE_Equal_To<int>, ACE_Thread_Mutex>::unbind(ext_id);
}
} else {
//exception? probably bad if we try to unbind something not in the tree
@@ -114,9 +119,10 @@ Live_P_Tree::unbind(const int& ext_id)
ACE_INLINE void
Live_P_Tree::recalculate_augmentation(ACE_RB_Tree_Node<int, AnnotationNode>* nodePtr) {
+ AnnotationNode placeholderNode;
AnnotationNode& node = nodePtr->item();
- AnnotationNode& left = nodePtr->left() ? AnnotationNode() : nodePtr->left()->item();
- AnnotationNode& right = nodePtr->right() ? AnnotationNode() : nodePtr->right()->item();
+ AnnotationNode& left = nodePtr->left() ? placeholderNode : nodePtr->left()->item();
+ AnnotationNode& right = nodePtr->right() ? placeholderNode : nodePtr->right()->item();
// (1) size
node.size = left.size + right.size + node.count;
@@ -162,7 +168,7 @@ Live_P_Tree::calc_max_i(ACE_RB_Tree_Node<int, AnnotationNode>* nodePtr, int extr
template <typename AnnotationId>
ACE_INLINE
Live_P_Strategy<AnnotationId>::Live_P_Strategy(int maxThreads)
-:DA_Strategy_Base(maxThreads),
+:DA_Strategy_Base<AnnotationId>(maxThreads),
min_illegal_is_computed_(false),
min_illegal_(0)
{
@@ -223,4 +229,4 @@ Live_P_Strategy<AnnotationId>::release(AnnotationId handle)
int annotation = get_annotation(handle);
tree_pimpl_->unbind(annotation);
computation_mutex_.release();
-} \ No newline at end of file
+}
diff --git a/ACE/ace/ace.mpc b/ACE/ace/ace.mpc
index c1bc1850aa0..b7b33086cea 100644
--- a/ACE/ace/ace.mpc
+++ b/ACE/ace/ace.mpc
@@ -31,6 +31,7 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
Barrier.cpp
Base_Thread_Adapter.cpp
Based_Pointer_Repository.cpp
+ Basic_P_Strategy.cpp
Basic_Stats.cpp
Basic_Types.cpp
Capabilities.cpp
@@ -49,17 +50,20 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
Containers.cpp
Copy_Disabled.cpp
Countdown_Time.cpp
+ DA_Strategy_Base.cpp
Date_Time.cpp
DEV.cpp
DEV_Addr.cpp
DEV_Connector.cpp
DEV_IO.cpp
DLL_Manager.cpp
+ Deadlock_Free_TP_Reactor.cpp
Dev_Poll_Reactor.cpp
Dirent.cpp
Dirent_Selector.cpp
Dump.cpp
Dynamic.cpp
+ Efficient_P_Strategy.cpp
Event.cpp
Event_Handler.cpp
FIFO.cpp
@@ -89,7 +93,9 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
IO_Cntl_Msg.cpp
IOStream.cpp
IPC_SAP.cpp
+ k_Efficient_P_Strategy.cpp
Lib_Find.cpp
+ Live_P_Strategy.cpp
Local_Memory_Pool.cpp
Lock.cpp
Log_Msg.cpp
@@ -357,10 +363,16 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
}
Inline_Files {
+ Basic_P_Strategy.inl
Bound_Ptr.inl
Condition_T.inl
+ DA_Strategy_Base.inl
+ Deadlock_Free_TP_Reactor.inl
+ Efficient_P_Strategy.inl
Guard_T.inl
Handle_Gobbler.inl
+ k_Efficient_P_Strategy.inl
+ Live_P_Strategy.inl
Lock_Adapter_T.inl
Refcounted_Auto_Ptr.inl
Reverse_Lock_T.inl
@@ -372,9 +384,12 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
Header_Files {
ACE_export.h
Array.h
+ Basic_P_Strategy.h
Bound_Ptr.h
CORBA_macros.h
Condition_T.h
+ DA_Strategy_Base.h
+ Deadlock_Free_TP_Reactor.h
Default_Constants.h
Exception_Macros.h
Global_Macros.h
@@ -383,6 +398,8 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
Handle_Gobbler.h
If_Then_Else.h
IO_Cntl_Msg.h
+ k_Efficient_P_Strategy.h
+ Live_P_Strategy.h
Lock_Adapter_T.h
Log_Priority.h
Malloc_Base.h
diff --git a/ACE/ace/k_Efficient_P_Strategy.inl b/ACE/ace/k_Efficient_P_Strategy.inl
index 5d67a95cc58..8ee0a61b897 100644
--- a/ACE/ace/k_Efficient_P_Strategy.inl
+++ b/ACE/ace/k_Efficient_P_Strategy.inl
@@ -2,7 +2,7 @@
template <typename AnnotationId>
ACE_INLINE
k_Efficient_P_Strategy<AnnotationId>::k_Efficient_P_Strategy(int maxThreads, int k)
-:DA_Strategy_Base(maxThreads),
+:DA_Strategy_Base<AnnotationId>(maxThreads),
k_(k)
{
a.resize(k_ + 1);
@@ -26,7 +26,7 @@ template <typename AnnotationId>
ACE_INLINE
bool k_Efficient_P_Strategy<AnnotationId>::is_deadlock_potential(AnnotationId handle)
{
- int annotation = get_annotation(handle);
+ int annotation = DA_Strategy_Base<AnnotationId>::get_annotation(handle);
return (annotation >= get_min_illegal());
}
@@ -35,7 +35,7 @@ ACE_INLINE
int
k_Efficient_P_Strategy<AnnotationId>::compute_min_illegal()
{
- int T = get_max_threads();
+ int T = this->get_max_threads();
for (int i=0; i<k_; ++i) {
if (!(A[i] < (T - i))) {
return i;
@@ -117,4 +117,4 @@ void k_Efficient_P_Strategy<AnnotationId>::release(AnnotationId handle)
}
min_illegal_is_computed_ = false;
computation_mutex_.release();
-} \ No newline at end of file
+}
diff --git a/ACE/tests/tests.mpc b/ACE/tests/tests.mpc
index e9b4437b94a..27f4e614bd8 100644
--- a/ACE/tests/tests.mpc
+++ b/ACE/tests/tests.mpc
@@ -338,6 +338,14 @@ project(Conn Test) : acetest {
}
}
+project(DA Reactor Test) : acetest {
+ avoids += ace_for_tao
+ exename = DA_Reactor_Test
+ Source_Files {
+ DA_Reactor_Test.cpp
+ }
+}
+
project(Date Time Test) : acetest {
avoids += ace_for_tao
exename = Date_Time_Test