Home | History | Annotate | Download | only in pthread_once
      1 This file contains various information.
      2 
      3 Please refer to http://nptl.bullopensource.org/phpBB/ for general information
      4 and questions. Feel free to post your questions there.
      5 
      6 
      7 We are doing our best to ensure the test case will be very portable.
      8 Please report any problems on the forum (see on top of this file)
      9 
     10 
     11  * Flags
     12 You may want to add -DVERBOSE=2 to have verbose tests,
     13 or -DVERBOSE=0 to have silent tests (for batchs for example).
     14 
     15 You may add -DWITHOUT_XOPEN to disable the XSI features
     16 from the tests. Some of the tests won't work with this option.
     17 
     18 You may want to add -DSCALABILITY_FACTOR=X, where X is an integer,
     19 to change the stress programs load (default is 1).
     20 
     21 
     22  * Commands
     23 Compilation under linux:
     24 gcc -o <bin> -lpthread <source>
     25    where <bin> is the executable you want to build and <source> is the source file.
     26 
     27 Compilation under AIX5L
     28 cc -o <bin> -lpthread <source>
     29   same comment as above
     30 
     31 Compilation under Solaris 9 (gcc: http://www.sunfreeware.com)
     32 gcc -std=gnu99 -lpthread -lrt  -o <bin> <source>
     33   same comment as above.
     34   Note: the -lrt is necessary for test cases using semaphore feature.
     35 
     36  * Execution
     37 
     38 Please consider the following:
     39 -> I am sizing the tests to fit on a bi-xeon IA32 machine, with 2GB RAM.
     40 You can change the SCALABILITY_FACTOR value to 2 or 3 to be more
     41 resources consuming on a bigger system. This will create more threads,
     42 etc... according to each case.
     43 
     44 -> Stress tests will run until they are killed with SIGUSR1 (or they
     45 fail). Currently, I do
     46 $> ./stress &
     47 and then after a while
     48 $> kill -USR1 <pid>
     49 or
     50 $> for PR in `ps o pid --no-headers -Cstress`; \
     51    do echo Sending SIGUSR1 to pid $PR...; \
     52        kill -USR1 $PR; \
     53    done;
     54 Some cases will keep on executing ~ 1 minute after they receive the
     55 signal; it is normal (time for stopping all threads).
     56 
     57