summaryrefslogtreecommitdiff
path: root/netsvcs
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-08-30 19:32:42 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-08-30 19:32:42 +0000
commit6a4d079a1330b91c50af8909ddd673f65e667fec (patch)
treea5f7df2c92c6559d1d97ae740e6ec283553fceaa /netsvcs
parent318ea665ab5316e3d40ba4a6aca7715f174ff072 (diff)
downloadATCD-6a4d079a1330b91c50af8909ddd673f65e667fec.tar.gz
*** empty log message ***
Diffstat (limited to 'netsvcs')
-rw-r--r--netsvcs/clients/Tokens/collection/collection.cpp1
-rw-r--r--netsvcs/clients/Tokens/collection/rw_locks.cpp6
-rw-r--r--netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp6
-rw-r--r--netsvcs/clients/Tokens/invariant/invariant.cpp12
-rw-r--r--netsvcs/clients/Tokens/mutex/test_mutex.cpp8
-rw-r--r--netsvcs/clients/Tokens/rw_lock/rw_locks.cpp6
6 files changed, 13 insertions, 26 deletions
diff --git a/netsvcs/clients/Tokens/collection/collection.cpp b/netsvcs/clients/Tokens/collection/collection.cpp
index 6d481a976b8..44e0b0a2bbd 100644
--- a/netsvcs/clients/Tokens/collection/collection.cpp
+++ b/netsvcs/clients/Tokens/collection/collection.cpp
@@ -41,7 +41,6 @@ static int remote = 0;
static void *
run_thread (void *vp)
{
- ACE_Thread_Control tc (ACE_Thread_Manager::instance ());
ACE_Token_Proxy *collection = (ACE_Token_Proxy *) vp;
int count = iterations;
diff --git a/netsvcs/clients/Tokens/collection/rw_locks.cpp b/netsvcs/clients/Tokens/collection/rw_locks.cpp
index 1e26744338f..6fd852ff97e 100644
--- a/netsvcs/clients/Tokens/collection/rw_locks.cpp
+++ b/netsvcs/clients/Tokens/collection/rw_locks.cpp
@@ -25,9 +25,6 @@ static int write_sleep = 0;
static void *
run_thread (void *vp)
{
- ACE_Thread_Manager *thr_mgr = (ACE_Thread_Manager*) vp;
- ACE_Thread_Control tc (thr_mgr);
-
for (int x = 0; x < iterations; x++)
{
int y = 0;
@@ -154,7 +151,8 @@ main (int argc, char* argv[])
ACE_Thread_Manager mgr;
if (mgr.spawn_n (threads, ACE_THR_FUNC (run_thread),
- (void *) &mgr, THR_BOUND | THR_SUSPENDED) == -1)
+ (void *) &0,
+ THR_BOUND | THR_SUSPENDED) == -1)
ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", "spawn failed"), -1);
if (mgr.resume_all () == -1)
diff --git a/netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp b/netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp
index 496e418a159..b36040e789a 100644
--- a/netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp
+++ b/netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp
@@ -60,8 +60,7 @@ static int rwlocks = 0;
static void *
two_token_thread (void *vp)
{
- Two_Tokens* tm = (Two_Tokens*) vp;
- ACE_Thread_Control (tm->thr_mgr_);
+ Two_Tokens* tm = (Two_Tokens *) vp;
for (int x = 0; x < iterations; x++)
{
@@ -105,8 +104,7 @@ two_token_thread (void *vp)
static void *
run_writer (void *vp)
{
- Four_Tokens* ft = (Four_Tokens *) vp;
- ACE_Thread_Control (ft->thr_mgr_);
+ Four_Tokens *ft = (Four_Tokens *) vp;
int acquire_number = 0;
for (int x = 0; x < iterations; x++)
diff --git a/netsvcs/clients/Tokens/invariant/invariant.cpp b/netsvcs/clients/Tokens/invariant/invariant.cpp
index 551eb79c530..9ee49feee86 100644
--- a/netsvcs/clients/Tokens/invariant/invariant.cpp
+++ b/netsvcs/clients/Tokens/invariant/invariant.cpp
@@ -32,9 +32,6 @@ static char * mutexname = "mutex";
static void *
run_reader_writer (void *vp)
{
- ACE_Thread_Manager *thr_mgr = (ACE_Thread_Manager*) vp;
- ACE_Thread_Control tc (thr_mgr);
-
for (int x = 0; x < 50; x++)
{
int y = 0;
@@ -81,9 +78,6 @@ run_reader_writer (void *vp)
static void *
run_mutex (void *vp)
{
- ACE_Thread_Manager *thr_mgr = (ACE_Thread_Manager*) vp;
- ACE_Thread_Control tc (thr_mgr);
-
for (int x = 0; x < 50; x++)
{
if (ACE_TOKEN_INVARIANTS::instance ()->mutex_acquired (mutexname) == 0)
@@ -169,7 +163,8 @@ main (int /* argc */, char* /* argv */ [])
// Run reader/writer test
if (mgr.spawn_n (2, ACE_THR_FUNC (run_reader_writer),
- (void *) &mgr, THR_NEW_LWP | THR_DETACHED) == -1)
+ (void *) 0,
+ THR_NEW_LWP | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", "spawn failed"), -1);
mgr.wait ();
@@ -178,7 +173,8 @@ main (int /* argc */, char* /* argv */ [])
// Run mutex test.
if (mgr.spawn_n (2, ACE_THR_FUNC (run_mutex),
- (void *) &mgr, THR_NEW_LWP | THR_DETACHED) == -1)
+ (void *) 0,
+ THR_NEW_LWP | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", "spawn failed"), -1);
mgr.wait ();
diff --git a/netsvcs/clients/Tokens/mutex/test_mutex.cpp b/netsvcs/clients/Tokens/mutex/test_mutex.cpp
index 1161928f477..3f6b723bdc1 100644
--- a/netsvcs/clients/Tokens/mutex/test_mutex.cpp
+++ b/netsvcs/clients/Tokens/mutex/test_mutex.cpp
@@ -35,9 +35,6 @@ static int spawn_count = 2;
static void *
run_test (void *vp)
{
- ACE_Thread_Manager *thr_mgr = (ACE_Thread_Manager*) vp;
- ACE_Thread_Control tc (thr_mgr);
-
int count = iterations;
// test recursive acquisition of a global proxy
while (count--)
@@ -110,7 +107,7 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char* argv[])
+main (int argc, char *argv[])
{
ACE_Thread_Manager thread_mgr;
@@ -129,7 +126,8 @@ main (int argc, char* argv[])
if (thread_mgr.spawn_n (spawn_count,
ACE_THR_FUNC (run_test),
- (void *) &thread_mgr, THR_BOUND) == -1)
+ 0,
+ THR_BOUND) == -1)
ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", "spawn"), -1);
thread_mgr.wait ();
diff --git a/netsvcs/clients/Tokens/rw_lock/rw_locks.cpp b/netsvcs/clients/Tokens/rw_lock/rw_locks.cpp
index 7f406da0685..0c9170b3828 100644
--- a/netsvcs/clients/Tokens/rw_lock/rw_locks.cpp
+++ b/netsvcs/clients/Tokens/rw_lock/rw_locks.cpp
@@ -46,9 +46,6 @@ static int renew = 0;
static void *
run_thread (void *vp)
{
- ACE_Thread_Manager *thr_mgr = (ACE_Thread_Manager*) vp;
- ACE_Thread_Control tc (thr_mgr);
-
for (int x = 0; x < iterations; x++)
{
int y = 0;
@@ -231,7 +228,8 @@ main (int argc, char* argv[])
ACE_Thread_Manager mgr;
if (mgr.spawn_n (threads, ACE_THR_FUNC (run_thread),
- (void *) &mgr, THR_BOUND | SUSPEND) == -1)
+ (void *) 0,
+ THR_BOUND | SUSPEND) == -1)
ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", "spawn failed"), -1);
#if ! defined (ACE_HAS_PTHREADS)