* Win32 NOTE: This code uses the API WaitForMultipleObjects to wait for all threads
to finish. * Since WaitForMultipleObjects has a 64 object limit, this code "as
is" can test * a maximum of 64 threads. If more threads are desired, one workaround
would be to * call WaitForMultiple threads once for each 64 entries of the array.
For example, * for a thread count > 128 and <= 192 you could change the code in
WaitForThreads() * to something like this: * * int remainder = tidCnt - 128; *
WaitForMultipleObjects(64, (HANDLE *)&tids[0], TRUE, INFINITE); * WaitForMultipleObjects(64,
(HANDLE *)&tids[64], TRUE, INFINITE); * WaitForMultipleObjects(remainder, (HANDLE
*)&tids[128], TRUE, INFINITE); * * Note: controlling number of CPUs tested. *
If Win32 and SYS_SMP are defined this code will prompt the user for the number
of CPUs * she'd like to test. On UNIX, control of # of CPUs is not handled via
code, * it is handled via command-line. See your documentation for the appropriate
command * for your platform. (we seem to recall that you use "runon "
on Digital * UNIX and "bindprocessor " on AIX. The runon command
runs * the app on the specified processor (or processor set). The bindprocessor
* command contrains the given process to run on the given CPU.)