diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-08 02:42:34 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-08 02:42:34 +0000 |
commit | 5b9224e3e1e419601af3e744bb670257afe79de0 (patch) | |
tree | 1fac1f88a900ad51d6197f860a07e7efb6cef8c1 /tests/Process_Mutex_Test.cpp | |
parent | 593de44924d2719eb2aeb5b3bd933bff110fa96b (diff) | |
download | ATCD-5b9224e3e1e419601af3e744bb670257afe79de0.tar.gz |
ChangeLogTag: Wed Jul 07 21:37:33 1999 David L. Levine <levine@cs.wustl.edu>
Diffstat (limited to 'tests/Process_Mutex_Test.cpp')
-rw-r--r-- | tests/Process_Mutex_Test.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/Process_Mutex_Test.cpp b/tests/Process_Mutex_Test.cpp index f2644810065..58f905b3d25 100644 --- a/tests/Process_Mutex_Test.cpp +++ b/tests/Process_Mutex_Test.cpp @@ -32,6 +32,11 @@ USELIB("..\ace\aced.lib"); static int release_mutex = 1; static int child_process = 0; static const char *mutex_name = ACE_DEFAULT_MUTEX_A; +#if defined (__Lynx__) + static const unsigned int processes = 4; +#else /* ! __Lynx__ */ + static const unsigned int processes = ACE_MAX_PROCESSES; +#endif /* ! __Lynx__ */ // Explain usage and exit. static void @@ -135,12 +140,11 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_TEXT (" -c -n %s"), ACE_WIDE_STRING (mutex_name)); - // Spawn ACE_MAX_PROCESSES processes that will contend for the - // lock. - ACE_Process servers[ACE_MAX_PROCESSES]; + // Spawn processes that will contend for the lock. + ACE_Process servers[processes]; size_t i; - for (i = 0; i < ACE_MAX_PROCESSES; i++) + for (i = 0; i < processes; i++) { ACE_ASSERT (servers[i].spawn (options) != -1); ACE_DEBUG ((LM_DEBUG, @@ -148,7 +152,7 @@ main (int argc, ASYS_TCHAR *argv[]) servers[i].getpid ())); } - for (i = 0; i < ACE_MAX_PROCESSES; i++) + for (i = 0; i < processes; i++) { // Wait for the process we created to exit. ACE_ASSERT (servers[i].wait () != -1); |