summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-04-11 21:13:04 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-04-11 21:13:04 +0000
commit220677b183fd43f1996ab9289534322481d0f59b (patch)
treec7a83d155051d66c46fd461a888a2ba1ae87d2c5 /examples
parent31aae5d1bba57d2c5a0ca12197099aaa91fb7d5a (diff)
downloadATCD-220677b183fd43f1996ab9289534322481d0f59b.tar.gz
.
Diffstat (limited to 'examples')
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
index d14c97aabf5..7a8f070e887 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
@@ -119,14 +119,16 @@ Options::Options (void)
message_buf_ (0),
io_source_ (ACE_INVALID_HANDLE), // Defaults to using the generator.
iterations_ (10000),
- oneway_ (1), // Make oneway calls the default.
- barrier_ (0)
+ oneway_ (1) // Make oneway calls the default.
+#if defined (ACE_MT_SAFE)
+ , barrier_ (0)
+#endif /* ACE_MT_SAFE */
{
}
Options::~Options (void)
{
- delete this->barrier_;
+ ACE_MT (delete this->barrier_);
delete [] this->message_buf_;
}
@@ -157,9 +159,9 @@ Options::init (void)
this->message_len_ - sizeof (ACE_UINT32));
// Allocate the barrier with the correct count.
- ACE_NEW_RETURN (this->barrier_,
- ACE_Barrier (this->threads_),
- -1);
+ ACE_MT (ACE_NEW_RETURN (this->barrier_,
+ ACE_Barrier (this->threads_),
+ -1));
return 0;
}
@@ -300,7 +302,7 @@ Options::shared_client_test (u_short port,
"(%P|%t) waiting...\n"));
// Wait for all other threads to finish initialization.
- this->barrier_->wait ();
+ ACE_MT (this->barrier_->wait ());
return buf;
}
// Static function entry point to the oneway client service.
@@ -471,7 +473,7 @@ run_client (void)
else
ACE_Thread_Manager::instance ()->wait ();
#else
- client (0);
+ (*OPTIONS::instance ()->thr_func) ();
#endif /* ACE_HAS_THREADS */
return 0;
}