home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / SAMPLES / COMPILER / SAMPLE02 / READ.ME < prev    next >
Text File  |  1993-03-13  |  1KB  |  43 lines

  1. This program demonstrates the multithread programming capability of the IBM C
  2. Set/2 compiler.
  3.  
  4. This sample program creates one thread for each argument.  Each thread prints
  5. "Hello world from thread n!"  the number of times specified in the
  6. corresponding argument.  For example
  7.  
  8.    SAMPLE02 2 4 6
  9.  
  10. creates three threads; the first thread displays "Hello" two times, the
  11. second thread displays "Hello" four times, and the third thread displays
  12. "Hello" six times.
  13.  
  14. The files for the sample program are:
  15.  
  16. SAMPLE02.C        The source file for the multithread program
  17.  
  18.                   In operation, the program works in the following order:
  19.  
  20.                      1. Creates the requested number of threads
  21.                      2. Waits until all threads have been created
  22.                      3. Begins multithread execution and waits for completion
  23.  
  24. SAMPLE02.DEF      The module definition file for the EXE.
  25.  
  26.  
  27. To build the sample program, use the supplied make files:
  28.  
  29. MAKE02S - Builds SAMPLE02.EXE. The compiler libraries are linked statically.
  30.  
  31. MAKE02D - Builds SAMPLE02.EXE. The compiler libraries are linked dynamically.
  32.  
  33. NOTE:  The program requires the IBM TOOLKIT 2.0 headers.
  34.  
  35. For example:
  36.  
  37.     nmake all -f make02d
  38.  
  39. To clean up after the sample program has been built and run, type the following
  40. command:
  41.  
  42.     nmake clean -f make02d
  43.