Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / performance-tests / Synch-Benchmarks / Perf_Test / memory_test.cpp
blob8d871b45259b0cbb31b921119c0a3edd7bd93d2d
1 #define ACE_BUILD_SVC_DLL
2 #include "ace/OS_NS_string.h"
3 #include "ace/Log_Msg.h"
4 #include "Performance_Test_Options.h"
5 #include "Benchmark_Performance.h"
7 #if defined (ACE_HAS_THREADS)
9 class ACE_Svc_Export Memory_Test : public Benchmark_Performance
11 public:
12 virtual int svc ();
15 int
16 Memory_Test::svc ()
18 int ni = this->thr_id ();
19 size_t length = performance_test_options.msg_size ();
20 char *from = new char[length];
21 char *to = new char[length];
23 synch_count = 1;
25 while (!this->done ())
27 ACE_OS::memcpy (to, from, length);
28 performance_test_options.thr_work_count[ni]++;
30 /* NOTREACHED */
31 return 0;
34 ACE_SVC_FACTORY_DECLARE (Memory_Test)
35 ACE_SVC_FACTORY_DEFINE (Memory_Test)
37 // ACE_Service_Object_Type mt (&memory_test, "Memory_Test");
38 #endif /* ACE_HAS_THREADS */