summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-08-22 01:33:15 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-08-22 01:33:15 +0000
commitd8839b830bb88aff7d1bdef5404a0068e75a1097 (patch)
tree134bc956a97bb901c84153de416455b06fae9bc2
parent86e6d339cb8ccf7f61880a93fc065250fa3a9fd6 (diff)
downloadATCD-d8839b830bb88aff7d1bdef5404a0068e75a1097.tar.gz
*** empty log message ***
-rw-r--r--examples/IPC_SAP/UPIPE_SAP/ex1.cpp2
-rw-r--r--examples/IPC_SAP/UPIPE_SAP/ex2.cpp17
-rw-r--r--examples/IPC_SAP/UPIPE_SAP/ex3.cpp15
3 files changed, 15 insertions, 19 deletions
diff --git a/examples/IPC_SAP/UPIPE_SAP/ex1.cpp b/examples/IPC_SAP/UPIPE_SAP/ex1.cpp
index 287a778a053..76bc702aa32 100644
--- a/examples/IPC_SAP/UPIPE_SAP/ex1.cpp
+++ b/examples/IPC_SAP/UPIPE_SAP/ex1.cpp
@@ -167,7 +167,7 @@ main (int, char *[])
"spawn"),
1);
// Wait for peer2 and peer1 threads to exit.
- thr_mgr.wait ();
+ ACE_Thread_Manager::instance ()->wait ();
return 0;
}
#else
diff --git a/examples/IPC_SAP/UPIPE_SAP/ex2.cpp b/examples/IPC_SAP/UPIPE_SAP/ex2.cpp
index 5ed7fc17df5..a2c0c5fbc4d 100644
--- a/examples/IPC_SAP/UPIPE_SAP/ex2.cpp
+++ b/examples/IPC_SAP/UPIPE_SAP/ex2.cpp
@@ -26,9 +26,6 @@ ACE_RCSID(UPIPE_SAP, ex2, "$Id$")
#if defined (ACE_HAS_THREADS)
-// Global thread manager.
-static ACE_Thread_Manager thr_mgr;
-
// Data for testsuite.
static int size = 0;
static int iterations = 0;
@@ -113,9 +110,9 @@ consumer (void *)
"(%t) consumer spawning the supplier thread\n"));
// Spawn the supplier thread.
- if (thr_mgr.spawn (ACE_THR_FUNC (supplier),
- (void *) 0,
- THR_NEW_LWP | THR_DETACHED) == -1)
+ if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (supplier),
+ (void *) 0,
+ THR_NEW_LWP | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"spawn"),
@@ -159,15 +156,15 @@ main (int argc, char *argv[])
iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 16;
// Spawn the two threads.
- if (thr_mgr.spawn (ACE_THR_FUNC (consumer),
- (void *) 0,
- THR_NEW_LWP | THR_DETACHED) == -1)
+ if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (consumer),
+ (void *) 0,
+ THR_NEW_LWP | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"spawn"),
1);
// Wait for producer and consumer threads to exit.
- thr_mgr.wait ();
+ ACE_Thread_Manager::instance ()->wait ();
return 0;
}
#else
diff --git a/examples/IPC_SAP/UPIPE_SAP/ex3.cpp b/examples/IPC_SAP/UPIPE_SAP/ex3.cpp
index 7492d218d61..eb0a63b1f69 100644
--- a/examples/IPC_SAP/UPIPE_SAP/ex3.cpp
+++ b/examples/IPC_SAP/UPIPE_SAP/ex3.cpp
@@ -27,9 +27,6 @@ ACE_RCSID(UPIPE_SAP, ex3, "$Id$")
#if defined (ACE_HAS_THREADS)
-// Global thread manager.
-static ACE_Thread_Manager thr_mgr;
-
// Data for testsuite.
static int size = 0;
static int iterations = 0;
@@ -84,8 +81,9 @@ consumer (void *)
"(%t) consumer spawning the supplier thread\n"));
// Spawn the supplier thread.
- if (thr_mgr.spawn (ACE_THR_FUNC (supplier), (void *) 0,
- THR_NEW_LWP | THR_DETACHED) == -1)
+ if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (supplier),
+ (void *) 0,
+ THR_NEW_LWP | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"spawn"),
@@ -138,14 +136,15 @@ main (int argc, char *argv[])
iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 16;
// Spawn the thread.
- if (thr_mgr.spawn (ACE_THR_FUNC (consumer), (void *) 0,
- THR_NEW_LWP | THR_DETACHED) == -1)
+ if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (consumer),
+ (void *) 0,
+ THR_NEW_LWP | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"spawn"),
1);
// Wait for producer and consumer threads to exit.
- thr_mgr.wait ();
+ ACE_Thread_Manager::instance ()->wait ();
return 0;
}
#else