summaryrefslogtreecommitdiff
path: root/performance-tests/Synch-Benchmarks
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-06-15 08:45:18 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-06-15 08:45:18 +0000
commit463d5b59f2496d48e96c1de6ea3407a69fb460a1 (patch)
tree830aa772eb8a827f1283310bed3c15390ab66736 /performance-tests/Synch-Benchmarks
parent2f159ba5e58aded096ed8df177b6a3a908d2a93c (diff)
downloadATCD-463d5b59f2496d48e96c1de6ea3407a69fb460a1.tar.gz
*** empty log message ***
Diffstat (limited to 'performance-tests/Synch-Benchmarks')
-rw-r--r--performance-tests/Synch-Benchmarks/Benchmark.cpp5
-rw-r--r--performance-tests/Synch-Benchmarks/Benchmark.h4
-rw-r--r--performance-tests/Synch-Benchmarks/Options.cpp4
-rw-r--r--performance-tests/Synch-Benchmarks/Options.h4
-rw-r--r--performance-tests/Synch-Benchmarks/condb_test.cpp13
-rw-r--r--performance-tests/Synch-Benchmarks/conds_test.cpp13
-rw-r--r--performance-tests/Synch-Benchmarks/context_test.cpp13
-rw-r--r--performance-tests/Synch-Benchmarks/memory_test.cpp13
-rw-r--r--performance-tests/Synch-Benchmarks/mutex_test.cpp12
-rw-r--r--performance-tests/Synch-Benchmarks/pipe_proc_test.cpp16
-rw-r--r--performance-tests/Synch-Benchmarks/pipe_thr_test.cpp15
-rw-r--r--performance-tests/Synch-Benchmarks/recursive_lock_test.cpp13
-rw-r--r--performance-tests/Synch-Benchmarks/rwrd_test.cpp13
-rw-r--r--performance-tests/Synch-Benchmarks/rwwr_test.cpp13
-rw-r--r--performance-tests/Synch-Benchmarks/sema_test.cpp13
-rw-r--r--performance-tests/Synch-Benchmarks/svc.conf26
-rw-r--r--performance-tests/Synch-Benchmarks/sysvsema_test.cpp13
17 files changed, 83 insertions, 120 deletions
diff --git a/performance-tests/Synch-Benchmarks/Benchmark.cpp b/performance-tests/Synch-Benchmarks/Benchmark.cpp
index 74a8bf9f903..9acf1e5d928 100644
--- a/performance-tests/Synch-Benchmarks/Benchmark.cpp
+++ b/performance-tests/Synch-Benchmarks/Benchmark.cpp
@@ -1,11 +1,12 @@
-#include "Benchmark.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
// Global variables (used by the dynamically linked services).
-int synch_count;
+ACE_Svc_Export int synch_count;
int buffer;
// Initialize the static variables.
diff --git a/performance-tests/Synch-Benchmarks/Benchmark.h b/performance-tests/Synch-Benchmarks/Benchmark.h
index 748cfb3c22a..41c21f59008 100644
--- a/performance-tests/Synch-Benchmarks/Benchmark.h
+++ b/performance-tests/Synch-Benchmarks/Benchmark.h
@@ -13,7 +13,7 @@
#if defined (ACE_HAS_THREADS)
extern int buffer;
-extern int synch_count;
+extern ACE_Svc_Export int synch_count;
#if defined (ACE_HAS_PTHREADS) || defined (VXWORKS)
@@ -40,7 +40,7 @@ private:
};
#endif /* ACE_HAS_PTHREADS || VXWORKS */
-class Benchmark : public ACE_Service_Object
+class ACE_Svc_Export Benchmark : public ACE_Service_Object
// TITLE
// Base class for all the timing tests.
{
diff --git a/performance-tests/Synch-Benchmarks/Options.cpp b/performance-tests/Synch-Benchmarks/Options.cpp
index 453c757356f..40060c016a3 100644
--- a/performance-tests/Synch-Benchmarks/Options.cpp
+++ b/performance-tests/Synch-Benchmarks/Options.cpp
@@ -1,6 +1,8 @@
-#include "Options.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "Options.h"
+
#if defined (ACE_HAS_THREADS)
// Manages the options.
Options options;
diff --git a/performance-tests/Synch-Benchmarks/Options.h b/performance-tests/Synch-Benchmarks/Options.h
index fccec81e3bd..39ce2c8ba8d 100644
--- a/performance-tests/Synch-Benchmarks/Options.h
+++ b/performance-tests/Synch-Benchmarks/Options.h
@@ -13,7 +13,7 @@
#if defined (ACE_HAS_THREADS)
-class Options
+class ACE_Svc_Export Options
{
public:
Options (void);
@@ -119,7 +119,7 @@ private:
};
// Make this available to any code that wants to see it!
-extern Options options;
+extern ACE_Svc_Export Options options;
#include "Options.i"
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/condb_test.cpp b/performance-tests/Synch-Benchmarks/condb_test.cpp
index 0075c06c7f3..a0362f6425f 100644
--- a/performance-tests/Synch-Benchmarks/condb_test.cpp
+++ b/performance-tests/Synch-Benchmarks/condb_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class Cond_Brdcast_Test : public Benchmark
+class ACE_Svc_Export Cond_Brdcast_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -60,12 +61,8 @@ Cond_Brdcast_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *cond_brdcast_test (void);
-
-ACE_Service_Object *cond_brdcast_test (void)
-{
- return new Cond_Brdcast_Test;
-}
+ACE_SVC_FACTORY_DECLARE (Cond_Brdcast_Test)
+ACE_SVC_FACTORY_DEFINE (Cond_Brdcast_Test)
// ACE_Service_Object_Type cbt (&cond_brdcast_test, "Condition_Broadcast_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/conds_test.cpp b/performance-tests/Synch-Benchmarks/conds_test.cpp
index 9b32afaf335..fb26bfc8967 100644
--- a/performance-tests/Synch-Benchmarks/conds_test.cpp
+++ b/performance-tests/Synch-Benchmarks/conds_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class Cond_Signal_Test : public Benchmark
+class ACE_Svc_Export Cond_Signal_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -63,12 +64,8 @@ Cond_Signal_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *cond_signal_test (void);
-
-ACE_Service_Object *cond_signal_test (void)
-{
- return new Cond_Signal_Test;
-}
+ACE_SVC_FACTORY_DECLARE (Cond_Signal_Test)
+ACE_SVC_FACTORY_DEFINE (Cond_Signal_Test)
// ACE_Service_Object_Type cst (&cond_signal_test, "Condition_Signal_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/context_test.cpp b/performance-tests/Synch-Benchmarks/context_test.cpp
index ff83af6af3a..3c348acda6b 100644
--- a/performance-tests/Synch-Benchmarks/context_test.cpp
+++ b/performance-tests/Synch-Benchmarks/context_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class Context_Test : public Benchmark
+class ACE_Svc_Export Context_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -29,12 +30,8 @@ Context_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *context_test (void);
-
-ACE_Service_Object *context_test (void)
-{
- return new Context_Test;
-}
+ACE_SVC_FACTORY_DECLARE (Context_Test)
+ACE_SVC_FACTORY_DEFINE (Context_Test)
// ACE_Service_Object_Type ct (&context_test, "Context_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/memory_test.cpp b/performance-tests/Synch-Benchmarks/memory_test.cpp
index 6859e006dde..0302322e131 100644
--- a/performance-tests/Synch-Benchmarks/memory_test.cpp
+++ b/performance-tests/Synch-Benchmarks/memory_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class Memory_Test : public Benchmark
+class ACE_Svc_Export Memory_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -31,12 +32,8 @@ Memory_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *memory_test (void);
-
-ACE_Service_Object *memory_test (void)
-{
- return new Memory_Test;
-}
+ACE_SVC_FACTORY_DECLARE (Memory_Test)
+ACE_SVC_FACTORY_DEFINE (Memory_Test)
// ACE_Service_Object_Type mt (&memory_test, "Memory_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/mutex_test.cpp b/performance-tests/Synch-Benchmarks/mutex_test.cpp
index 91c4d8aaef0..2137b05859a 100644
--- a/performance-tests/Synch-Benchmarks/mutex_test.cpp
+++ b/performance-tests/Synch-Benchmarks/mutex_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class Mutex_Test : public Benchmark
+class ACE_Svc_Export Mutex_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -36,11 +37,8 @@ Mutex_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *mutex_test (void);
+ACE_SVC_FACTORY_DECLARE (Mutex_Test)
+ACE_SVC_FACTORY_DEFINE (Mutex_Test)
-ACE_Service_Object *mutex_test (void)
-{
- return new Mutex_Test;
-}
// ACE_Service_Object_Type mut (&mutex_test, "Mutex_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/pipe_proc_test.cpp b/performance-tests/Synch-Benchmarks/pipe_proc_test.cpp
index 6ee3e762567..506cb06dd7f 100644
--- a/performance-tests/Synch-Benchmarks/pipe_proc_test.cpp
+++ b/performance-tests/Synch-Benchmarks/pipe_proc_test.cpp
@@ -1,14 +1,12 @@
-#include "Options.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-extern int buffer;
-extern int synch_count;
-
-class Pipe_Proc_Test : public Benchmark
+class ACE_Svc_Export Pipe_Proc_Test : public Benchmark
{
public:
int init (int, char **);
@@ -77,12 +75,8 @@ Pipe_Proc_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *pipe_proc_test (void);
-
-ACE_Service_Object *pipe_proc_test (void)
-{
- return new Pipe_Proc_Test;
-}
+ACE_SVC_FACTORY_DECLARE (Pipe_Proc_Test)
+ACE_SVC_FACTORY_DEFINE (Pipe_Proc_Test)
// ACE_Service_Object_Type ppt (&pipe_proc_test, "Pipe_Proc_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/pipe_thr_test.cpp b/performance-tests/Synch-Benchmarks/pipe_thr_test.cpp
index 10bad6e9818..c49fc72bf07 100644
--- a/performance-tests/Synch-Benchmarks/pipe_thr_test.cpp
+++ b/performance-tests/Synch-Benchmarks/pipe_thr_test.cpp
@@ -1,14 +1,13 @@
-#include "ace/Thread_Manager.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Thread_Manager.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-extern int synch_count;
-
-class Pipe_Thr_Test : public Benchmark
+class ACE_Svc_Export Pipe_Thr_Test : public Benchmark
{
public:
virtual int init (int, char **);
@@ -71,12 +70,8 @@ Pipe_Thr_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *pipe_thr_test (void);
-
-ACE_Service_Object *pipe_thr_test (void)
-{
- return new Pipe_Thr_Test;
-}
+ACE_SVC_FACTORY_DECLARE (Pipe_Thr_Test)
+ACE_SVC_FACTORY_DEFINE (Pipe_Thr_Test)
// ACE_Service_Object_Type ptt (&pipe_thr_test, "Pipe_Thr_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/recursive_lock_test.cpp b/performance-tests/Synch-Benchmarks/recursive_lock_test.cpp
index b3579d980d5..6acbb6e5729 100644
--- a/performance-tests/Synch-Benchmarks/recursive_lock_test.cpp
+++ b/performance-tests/Synch-Benchmarks/recursive_lock_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class Recursive_Lock_Test : public Benchmark
+class ACE_Svc_Export Recursive_Lock_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -34,12 +35,8 @@ Recursive_Lock_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *recursive_lock_test (void);
-
-ACE_Service_Object *recursive_lock_test (void)
-{
- return new Recursive_Lock_Test;
-}
+ACE_SVC_FACTORY_DECLARE (Recursive_Lock_Test)
+ACE_SVC_FACTORY_DEFINE (Recursive_Lock_Test)
// ACE_Service_Object_Type rlt (&recursive_lock_test, "Recursive_Lock_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/rwrd_test.cpp b/performance-tests/Synch-Benchmarks/rwrd_test.cpp
index 123781631e8..17f7aee6b27 100644
--- a/performance-tests/Synch-Benchmarks/rwrd_test.cpp
+++ b/performance-tests/Synch-Benchmarks/rwrd_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class RWRD_Test : public Benchmark
+class ACE_Svc_Export RWRD_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -35,12 +36,8 @@ RWRD_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *rwrd_test (void);
-
-ACE_Service_Object *rwrd_test (void)
-{
- return new RWRD_Test;
-}
+ACE_SVC_FACTORY_DECLARE (RWRD_Test)
+ACE_SVC_FACTORY_DEFINE (RWRD_Test)
// ACE_Service_Object_Type rwrdt (&rwrd_test, "RWRD_Mutex_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/rwwr_test.cpp b/performance-tests/Synch-Benchmarks/rwwr_test.cpp
index 9f91b85323e..5426c477015 100644
--- a/performance-tests/Synch-Benchmarks/rwwr_test.cpp
+++ b/performance-tests/Synch-Benchmarks/rwwr_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class RWWR_Test : public Benchmark
+class ACE_Svc_Export RWWR_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -35,12 +36,8 @@ RWWR_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *rwwr_test (void);
-
-ACE_Service_Object *rwwr_test (void)
-{
- return new RWWR_Test;
-}
+ACE_SVC_FACTORY_DECLARE (RWWR_Test)
+ACE_SVC_FACTORY_DEFINE (RWWR_Test)
// ACE_Service_Object_Type rwwrt (&rwwr_test, "RWWR_Mutext_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/sema_test.cpp b/performance-tests/Synch-Benchmarks/sema_test.cpp
index 3862ca4123f..db671366076 100644
--- a/performance-tests/Synch-Benchmarks/sema_test.cpp
+++ b/performance-tests/Synch-Benchmarks/sema_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/Synch.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class Sema_Test : public Benchmark
+class ACE_Svc_Export Sema_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -35,12 +36,8 @@ Sema_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *sema_test (void);
-
-ACE_Service_Object *sema_test (void)
-{
- return new Sema_Test;
-}
+ACE_SVC_FACTORY_DECLARE (Sema_Test)
+ACE_SVC_FACTORY_DEFINE (Sema_Test)
// ACE_Service_Object_Type semt (&sema_test, "Semaphore_Test");
#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/svc.conf b/performance-tests/Synch-Benchmarks/svc.conf
index 45a6a49d4b8..be536f7aac9 100644
--- a/performance-tests/Synch-Benchmarks/svc.conf
+++ b/performance-tests/Synch-Benchmarks/svc.conf
@@ -1,15 +1,15 @@
# Dynamically configure all the tests
-dynamic Mutex_Test Service_Object * .shobj/mutex_test.so:mutex_test()
-dynamic Mutex_Test Service_Object * .shobj/mutex_test.so:mutex_test()
-dynamic Semaphore_Test Service_Object * .shobj/sema_test.so:sema_test()
-dynamic Recursive_Lock_Test Service_Object * .shobj/recursive_lock_test.so:recursive_lock_test()
-dynamic RWRD_Mutex_Test Service_Object * .shobj/rwrd_test.so:rwrd_test()
-dynamic RWWR_Mutex_Test Service_Object * .shobj/rwwr_test.so:rwwr_test()
-dynamic SYSVSema_Test Service_Object * .shobj/sysvsema_test.so:sysvsema_test()
-dynamic Context_Test Service_Object * .shobj/context_test.so:context_test()
-# dynamic Memory_Test Service_Object * .shobj/memory_test.so:memory_test()
-# dynamic Pipe_Thr_Test Service_Object * .shobj/pipe_thr_test.so:pipe_thr_test()
-# dynamic Pipe_Proc_Test Service_Object * .shobj/pipe_proc_test.so:pipe_proc_test()
+dynamic Mutex_Test Service_Object * ./synch_tests:_make_Mutex_Test()
+dynamic Mutex_Test Service_Object * ./synch_tests:_make_Mutex_Test()
+dynamic Semaphore_Test Service_Object * ./synch_tests:_make_Sema_Test()
+dynamic Recursive_Lock_Test Service_Object * ./synch_tests:_make_Recursive_Lock_Test()
+dynamic RWRD_Mutex_Test Service_Object * ./synch_tests:_make_RWRD_Test()
+dynamic RWWR_Mutex_Test Service_Object * ./synch_tests:_make_RWWR_Test()
+dynamic SYSVSema_Test Service_Object * ./synch_tests:_make_SYSVSema_Test()
+dynamic Context_Test Service_Object * ./synch_tests:_make_Context_Test()
+# dynamic Memory_Test Service_Object * ./synch_tests:_make_Memory_Test()
+# dynamic Pipe_Thr_Test Service_Object * ./synch_tests:_make_Pipe_Thr_Test()
+# dynamic Pipe_Proc_Test Service_Object * ./synch_tests:_make_Pipe_Proc_Test()
# The following two tests don't work correctly yet...
-# dynamic Condition_Broadcast_Test Service_Object * .shobj/condb_test.so:cond_brdcast_test()
-# dynamic Condition_Signal_Test Service_Object * .shobj/conds_test.so:cond_signal_test()
+# dynamic Condition_Broadcast_Test Service_Object * ./synch_tests:_make_Cond_Brdcast_Test()
+# dynamic Condition_Signal_Test Service_Object * ./synch_tests:_make_Cond_Signal_Test()
diff --git a/performance-tests/Synch-Benchmarks/sysvsema_test.cpp b/performance-tests/Synch-Benchmarks/sysvsema_test.cpp
index 8710e64536f..5623a899bfc 100644
--- a/performance-tests/Synch-Benchmarks/sysvsema_test.cpp
+++ b/performance-tests/Synch-Benchmarks/sysvsema_test.cpp
@@ -1,12 +1,13 @@
-#include "ace/SV_Semaphore_Simple.h"
// $Id$
+#define ACE_BUILD_SVC_DLL
+#include "ace/SV_Semaphore_Simple.h"
#include "Options.h"
#include "Benchmark.h"
#if defined (ACE_HAS_THREADS)
-class SYSVSema_Test : public Benchmark
+class ACE_Svc_Export SYSVSema_Test : public Benchmark
{
public:
virtual int svc (void);
@@ -36,12 +37,8 @@ SYSVSema_Test::svc (void)
return 0;
}
-extern "C" ACE_Service_Object *sysvsema_test (void);
-
-ACE_Service_Object *sysvsema_test (void)
-{
- return new SYSVSema_Test;
-}
+ACE_SVC_FACTORY_DECLARE (SYSVSema_Test)
+ACE_SVC_FACTORY_DEFINE (SYSVSema_Test)
// ACE_Service_Object_Type st (&sysvsema_test, "SYSVSema_Test");
#endif /* ACE_HAS_THREADS */