summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_2084_Regression
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-10-29 14:31:59 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-10-29 14:31:59 +0000
commitaa6ca3cf321927d44a09855a4cabec677ddbdf98 (patch)
treeceb3607fa2534bb646c8075ad260afbe18cb8476 /TAO/tests/Bug_2084_Regression
parentf1162ec161b1389816339636a7a0de7cd7a57c43 (diff)
downloadATCD-aa6ca3cf321927d44a09855a4cabec677ddbdf98.tar.gz
Mon Oct 29 14:31:15 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tests/Bug_2084_Regression')
-rw-r--r--TAO/tests/Bug_2084_Regression/EventNode.cpp5
-rw-r--r--TAO/tests/Bug_2084_Regression/Hello.cpp4
-rwxr-xr-xTAO/tests/Bug_2084_Regression/tid_to_int.h50
3 files changed, 2 insertions, 57 deletions
diff --git a/TAO/tests/Bug_2084_Regression/EventNode.cpp b/TAO/tests/Bug_2084_Regression/EventNode.cpp
index a6b9de961e6..290426559b9 100644
--- a/TAO/tests/Bug_2084_Regression/EventNode.cpp
+++ b/TAO/tests/Bug_2084_Regression/EventNode.cpp
@@ -2,7 +2,6 @@
// $Id$
//
#include "EventNode.h"
-#include "tid_to_int.h"
#include "tao/ORB_Core.h"
#include "tao/ORB_Table.h"
@@ -47,9 +46,7 @@ void EventNode::registerHello ( ::Test::Hello_ptr h )
}
}
- CORBA::String_var str =
- h->get_string(
- ACE_thread_t_to_integer< ::Test::ThreadId> (ACE_Thread::self ()));
+ CORBA::String_var str = h->get_string(ACE_Thread::self ());
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) - EventNode: string returned <%s>\n",
str.in ()));
diff --git a/TAO/tests/Bug_2084_Regression/Hello.cpp b/TAO/tests/Bug_2084_Regression/Hello.cpp
index 1d1dcabe18b..4fb5dda7514 100644
--- a/TAO/tests/Bug_2084_Regression/Hello.cpp
+++ b/TAO/tests/Bug_2084_Regression/Hello.cpp
@@ -2,7 +2,6 @@
// $Id$
//
#include "Hello.h"
-#include "tid_to_int.h"
#include "tao/ORB_Core.h"
#include "tao/ORB_Table.h"
@@ -25,8 +24,7 @@ Hello::get_string (::Test::ThreadId caller_threadid)
ACE_Thread_ID this_ID;
this_ID.id (this->thr_id_);
- if (ACE_thread_t_to_integer< ::Test::ThreadId> (ACE_Thread::self ())
- != caller_threadid)
+ if (ACE_Thread::self () != caller_threadid)
{
// this means a remote call was made
diff --git a/TAO/tests/Bug_2084_Regression/tid_to_int.h b/TAO/tests/Bug_2084_Regression/tid_to_int.h
deleted file mode 100755
index 4b374663c38..00000000000
--- a/TAO/tests/Bug_2084_Regression/tid_to_int.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// -*- C++ -*-
-
-/**
- * @file tid_to_int.h
- *
- * $Id$
- *
- * Convert an ACE_thread_t to an integer in a way that doesn't rely
- * heavily on platform-specific configuration.
- *
- * @author Ossama Othman
- */
-
-namespace
-{
- template<typename thread_id_type, typename ace_thread_id_type>
- struct ACE_thread_t_to_integer_i
- {
- thread_id_type operator() (ace_thread_id_type tid)
- {
- // We assume sizeof(thread_id_type) >= sizeof(ace_thread_id_type).
- return (thread_id_type) (tid);
- }
- };
-
- template<typename thread_id_type, typename ace_thread_id_type>
- struct ACE_thread_t_to_integer_i<thread_id_type, ace_thread_id_type*>
- {
- thread_id_type operator() (ace_thread_id_type* tid)
- {
- // ACE_thread_t is a pointer. Cast to an intermediate integer
- // type large enough to hold a pointer.
-#if defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64))
- int const tmp = reinterpret_cast<int> (tid);
-#else
- intptr_t const tmp = reinterpret_cast<intptr_t> (tid);
-#endif
-
- // We assume sizeof(thread_id_type) >= sizeof(ace_thread_id_type).
- return (thread_id_type) tmp;
- }
- };
-
- template<typename thread_id_type>
- thread_id_type
- ACE_thread_t_to_integer (ACE_thread_t tid)
- {
- return ACE_thread_t_to_integer_i<thread_id_type, ACE_thread_t>() (tid);
- }
-}