Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
Bmakefile | D | 12-May-2024 | 10.6 KiB | 355 | 318 | |
ChangeLog | D | 12-May-2024 | 1 | |||
ChangeLog.2010 | D | 12-May-2024 | 26.6 KiB | 919 | 614 | |
ChangeLog.2013 | D | 12-May-2024 | 0 | |||
Debug.dsp | D | 12-May-2024 | 3.4 KiB | 94 | 81 | |
Debug.dsw | D | 12-May-2024 | 504 | 30 | 19 | |
Debug.plg | D | 12-May-2024 | 1.1 KiB | 33 | 29 | |
Debug.txt | D | 12-May-2024 | 219 | 6 | 5 | |
GNUmakefile | D | 12-May-2024 | 14.6 KiB | 516 | 416 | |
Makefile | D | 12-May-2024 | 14.4 KiB | 443 | 352 | |
README | D | 12-May-2024 | 1 KiB | 45 | 27 | |
README.BENCHTESTS | D | 12-May-2024 | 2 KiB | 75 | 55 | |
README.WINPTHREADS | D | 12-May-2024 | 2.2 KiB | 64 | 56 | |
SIZES.GC | D | 12-May-2024 | 561 | 17 | 16 | |
SIZES.GCE | D | 12-May-2024 | 744 | 22 | 21 | |
SIZES.VC | D | 12-May-2024 | 673 | 21 | 19 | |
SIZES.VCE | D | 12-May-2024 | 672 | 20 | 19 | |
SIZES.VSE | D | 12-May-2024 | 672 | 20 | 19 | |
Wmakefile | D | 12-May-2024 | 10.8 KiB | 350 | 312 | |
barrier1.c | D | 12-May-2024 | 1.8 KiB | 59 | 12 | |
barrier2.c | D | 12-May-2024 | 1.8 KiB | 56 | 10 | |
barrier3.c | D | 12-May-2024 | 2.3 KiB | 78 | 27 | |
barrier4.c | D | 12-May-2024 | 2.8 KiB | 111 | 54 | |
barrier5.c | D | 12-May-2024 | 3.3 KiB | 121 | 63 | |
barrier6.c | D | 12-May-2024 | 3.1 KiB | 118 | 59 | |
benchlib.c | D | 12-May-2024 | 6.9 KiB | 362 | 258 | |
benchtest.h | D | 12-May-2024 | 2.3 KiB | 69 | 25 | |
benchtest1.c | D | 12-May-2024 | 7 KiB | 250 | 137 | |
benchtest2.c | D | 12-May-2024 | 8.8 KiB | 312 | 216 | |
benchtest3.c | D | 12-May-2024 | 5.8 KiB | 202 | 110 | |
benchtest4.c | D | 12-May-2024 | 5.3 KiB | 183 | 96 | |
benchtest5.c | D | 12-May-2024 | 4.4 KiB | 160 | 73 | |
cancel1.c | D | 12-May-2024 | 4.4 KiB | 181 | 65 | |
cancel2.c | D | 12-May-2024 | 5.4 KiB | 252 | 119 | |
cancel3.c | D | 12-May-2024 | 4.8 KiB | 203 | 75 | |
cancel4.c | D | 12-May-2024 | 4.6 KiB | 205 | 73 | |
cancel5.c | D | 12-May-2024 | 4.6 KiB | 200 | 73 | |
cancel6a.c | D | 12-May-2024 | 4.2 KiB | 193 | 74 | |
cancel6d.c | D | 12-May-2024 | 4.1 KiB | 192 | 77 | |
cancel7.c | D | 12-May-2024 | 4.6 KiB | 203 | 82 | |
cancel8.c | D | 12-May-2024 | 2.6 KiB | 131 | 82 | |
cancel9.c | D | 12-May-2024 | 5.1 KiB | 203 | 95 | |
cleanup0.c | D | 12-May-2024 | 4.9 KiB | 230 | 100 | |
cleanup1.c | D | 12-May-2024 | 5.2 KiB | 243 | 107 | |
cleanup2.c | D | 12-May-2024 | 4.6 KiB | 218 | 96 | |
cleanup3.c | D | 12-May-2024 | 4.7 KiB | 223 | 99 | |
condvar1.c | D | 12-May-2024 | 2.5 KiB | 98 | 12 | |
condvar1_1.c | D | 12-May-2024 | 2.9 KiB | 116 | 30 | |
condvar1_2.c | D | 12-May-2024 | 3.1 KiB | 125 | 37 | |
condvar2.c | D | 12-May-2024 | 3.3 KiB | 127 | 36 | |
condvar2_1.c | D | 12-May-2024 | 1.6 KiB | 81 | 58 | |
condvar3.c | D | 12-May-2024 | 1.4 KiB | 71 | 47 | |
condvar3_1.c | D | 12-May-2024 | 4.8 KiB | 191 | 87 | |
condvar3_2.c | D | 12-May-2024 | 4.6 KiB | 184 | 70 | |
condvar3_3.c | D | 12-May-2024 | 3.5 KiB | 133 | 28 | |
condvar4.c | D | 12-May-2024 | 1.9 KiB | 95 | 61 | |
condvar5.c | D | 12-May-2024 | 1.9 KiB | 95 | 61 | |
condvar6.c | D | 12-May-2024 | 3.1 KiB | 172 | 95 | |
condvar7.c | D | 12-May-2024 | 3.7 KiB | 196 | 110 | |
condvar8.c | D | 12-May-2024 | 3.5 KiB | 188 | 110 | |
condvar9.c | D | 12-May-2024 | 4 KiB | 196 | 117 | |
context1.c | D | 12-May-2024 | 1,005 | 73 | 46 | |
count1.c | D | 12-May-2024 | 2.5 KiB | 91 | 30 | |
create1.c | D | 12-May-2024 | 1.9 KiB | 67 | 16 | |
create2.c | D | 12-May-2024 | 2.6 KiB | 109 | 28 | |
create3.c | D | 12-May-2024 | 2.7 KiB | 124 | 33 | |
delay1.c | D | 12-May-2024 | 1.7 KiB | 52 | 8 | |
delay2.c | D | 12-May-2024 | 2.3 KiB | 83 | 31 | |
detach1.c | D | 12-May-2024 | 2.5 KiB | 94 | 33 | |
equal1.c | D | 12-May-2024 | 2 KiB | 67 | 17 | |
errno1.c | D | 12-May-2024 | 3.7 KiB | 179 | 60 | |
exception1.c | D | 12-May-2024 | 5.9 KiB | 264 | 119 | |
exception2.c | D | 12-May-2024 | 3.4 KiB | 159 | 55 | |
exception3.c | D | 12-May-2024 | 4.1 KiB | 181 | 70 | |
exit1.c | D | 12-May-2024 | 1.7 KiB | 51 | 8 | |
exit2.c | D | 12-May-2024 | 1.8 KiB | 65 | 16 | |
exit3.c | D | 12-May-2024 | 381 | 31 | 20 | |
exit4.c | D | 12-May-2024 | 4.2 KiB | 186 | 69 | |
exit5.c | D | 12-May-2024 | 4.4 KiB | 192 | 73 | |
eyal1.c | D | 12-May-2024 | 8.5 KiB | 368 | 195 | |
inherit1.c | D | 12-May-2024 | 3.1 KiB | 108 | 80 | |
join0.c | D | 12-May-2024 | 2 KiB | 68 | 18 | |
join1.c | D | 12-May-2024 | 2.2 KiB | 79 | 27 | |
join2.c | D | 12-May-2024 | 471 | 32 | 24 | |
join3.c | D | 12-May-2024 | 2.2 KiB | 76 | 25 | |
kill1.c | D | 12-May-2024 | 2.1 KiB | 84 | 7 | |
loadfree.c | D | 12-May-2024 | 2.6 KiB | 71 | 6 | |
mutex1.c | D | 12-May-2024 | 2.1 KiB | 69 | 14 | |
mutex1e.c | D | 12-May-2024 | 2.3 KiB | 75 | 17 | |
mutex1n.c | D | 12-May-2024 | 2.3 KiB | 75 | 17 | |
mutex1r.c | D | 12-May-2024 | 2.3 KiB | 75 | 17 | |
mutex2.c | D | 12-May-2024 | 2.2 KiB | 71 | 18 | |
mutex2e.c | D | 12-May-2024 | 2 KiB | 67 | 14 | |
mutex2r.c | D | 12-May-2024 | 2 KiB | 67 | 14 | |
mutex3.c | D | 12-May-2024 | 2.1 KiB | 76 | 20 | |
mutex3e.c | D | 12-May-2024 | 2.1 KiB | 76 | 20 | |
mutex3r.c | D | 12-May-2024 | 2.1 KiB | 76 | 20 | |
mutex4.c | D | 12-May-2024 | 3.7 KiB | 117 | 57 | |
mutex5.c | D | 12-May-2024 | 2.4 KiB | 68 | 20 | |
mutex6.c | D | 12-May-2024 | 2.6 KiB | 95 | 27 | |
mutex6e.c | D | 12-May-2024 | 3 KiB | 103 | 34 | |
mutex6es.c | D | 12-May-2024 | 2.7 KiB | 95 | 27 | |
mutex6n.c | D | 12-May-2024 | 2.9 KiB | 105 | 32 | |
mutex6r.c | D | 12-May-2024 | 2.9 KiB | 101 | 34 | |
mutex6rs.c | D | 12-May-2024 | 2.7 KiB | 93 | 27 | |
mutex6s.c | D | 12-May-2024 | 2.5 KiB | 94 | 26 | |
mutex7.c | D | 12-May-2024 | 2.4 KiB | 83 | 24 | |
mutex7e.c | D | 12-May-2024 | 3 KiB | 103 | 34 | |
mutex7n.c | D | 12-May-2024 | 2.7 KiB | 94 | 30 | |
mutex7r.c | D | 12-May-2024 | 3 KiB | 101 | 34 | |
mutex8.c | D | 12-May-2024 | 2 KiB | 83 | 29 | |
mutex8e.c | D | 12-May-2024 | 2.5 KiB | 98 | 35 | |
mutex8n.c | D | 12-May-2024 | 2.5 KiB | 98 | 35 | |
mutex8r.c | D | 12-May-2024 | 2.5 KiB | 98 | 35 | |
once1.c | D | 12-May-2024 | 2 KiB | 78 | 24 | |
once2.c | D | 12-May-2024 | 3.3 KiB | 123 | 64 | |
once3.c | D | 12-May-2024 | 4.1 KiB | 140 | 61 | |
once4.c | D | 12-May-2024 | 5.9 KiB | 207 | 109 | |
priority1.c | D | 12-May-2024 | 4.7 KiB | 173 | 72 | |
priority2.c | D | 12-May-2024 | 4.8 KiB | 171 | 72 | |
reuse1.c | D | 12-May-2024 | 1.1 KiB | 53 | 42 | |
reuse2.c | D | 12-May-2024 | 1.8 KiB | 89 | 61 | |
runall.c | D | 12-May-2024 | 1.8 KiB | 68 | 60 | |
rwlock1.c | D | 12-May-2024 | 1.9 KiB | 62 | 12 | |
rwlock2.c | D | 12-May-2024 | 2 KiB | 67 | 14 | |
rwlock2_t.c | D | 12-May-2024 | 2.3 KiB | 79 | 22 | |
rwlock3.c | D | 12-May-2024 | 2.1 KiB | 77 | 20 | |
rwlock3_t.c | D | 12-May-2024 | 2.4 KiB | 88 | 28 | |
rwlock4.c | D | 12-May-2024 | 2.1 KiB | 77 | 20 | |
rwlock4_t.c | D | 12-May-2024 | 2.4 KiB | 88 | 28 | |
rwlock5.c | D | 12-May-2024 | 2.2 KiB | 79 | 21 | |
rwlock5_t.c | D | 12-May-2024 | 2.5 KiB | 90 | 29 | |
rwlock6.c | D | 12-May-2024 | 2.9 KiB | 103 | 45 | |
rwlock6_t.c | D | 12-May-2024 | 3.5 KiB | 127 | 65 | |
rwlock6_t2.c | D | 12-May-2024 | 3.3 KiB | 120 | 59 | |
rwlock7.c | D | 12-May-2024 | 4.6 KiB | 200 | 128 | |
rwlock8.c | D | 12-May-2024 | 4.8 KiB | 209 | 130 | |
self1.c | D | 12-May-2024 | 145 | 12 | 8 | |
self2.c | D | 12-May-2024 | 1.9 KiB | 74 | 18 | |
semaphore1.c | D | 12-May-2024 | 3.4 KiB | 162 | 67 | |
semaphore2.c | D | 12-May-2024 | 2.6 KiB | 109 | 25 | |
semaphore3.c | D | 12-May-2024 | 3 KiB | 122 | 37 | |
semaphore4.c | D | 12-May-2024 | 3.5 KiB | 141 | 49 | |
semaphore4t.c | D | 12-May-2024 | 3.3 KiB | 133 | 44 | |
semaphore5.c | D | 12-May-2024 | 2.4 KiB | 104 | 19 | |
sizes.c | D | 12-May-2024 | 1.5 KiB | 31 | 24 | |
spin1.c | D | 12-May-2024 | 1.9 KiB | 60 | 12 | |
spin2.c | D | 12-May-2024 | 2.1 KiB | 76 | 22 | |
spin3.c | D | 12-May-2024 | 2.2 KiB | 73 | 25 | |
spin4.c | D | 12-May-2024 | 2.8 KiB | 104 | 48 | |
stress1.c | D | 12-May-2024 | 7.1 KiB | 279 | 143 | |
test.h | D | 12-May-2024 | 4.8 KiB | 183 | 116 | |
tryentercs.c | D | 12-May-2024 | 3 KiB | 104 | 39 | |
tryentercs2.c | D | 12-May-2024 | 2.8 KiB | 94 | 30 | |
tsd1.c | D | 12-May-2024 | 5 KiB | 212 | 78 | |
tsd2.c | D | 12-May-2024 | 5.1 KiB | 216 | 81 | |
valid1.c | D | 12-May-2024 | 2.4 KiB | 104 | 24 | |
valid2.c | D | 12-May-2024 | 2.2 KiB | 85 | 8 |
README
1Running test cases in this directory 2------------------------------------ 3 4These make scripts expect to be able to copy the dll, library 5and header files from this directory's parent directory, 6which should be the pthreads-win32 source directory. 7 8MS VC nmake 9------------- 10 11Run the target corresponding to the DLL version being tested: 12 13nmake clean VC 14 15or: 16 17nmake clean VS 18 19 20GNU GCC make 21------------ 22 23Run "make clean" and then "make". See the "Known bugs" section 24in ..\README. 25 26 27Writing Test Cases 28------------------ 29 30Tests written in this test suite should behave in the following manner: 31 32 * If a test fails, leave main() with a result of 1. 33 34 * If a test succeeds, leave main() with a result of 0. 35 36 * No diagnostic output should appear when the test is succeeding. 37 Diagnostic output may be emitted if something in the test 38 fails, to help determine the cause of the test failure. 39 40Notes: 41------ 42 43Many test cases use knowledge of implementation internals which are supposed 44to be opaque to portable applications. 45
README.BENCHTESTS
1 2------------ 3Benchmarking 4------------ 5There is a set a benchmarking programs in the 6"tests" directory. These should be runnable using the 7following command-lines corresponding to each of the possible 8library builds: 9 10MSVC: 11nmake clean VC-bench 12nmake clean VCE-bench 13nmake clean VSE-bench 14 15Mingw32: 16make clean GC-bench 17make clean GCE-bench 18 19UWIN: 20The benchtests are run as part of the testsuite. 21 22 23Mutex benchtests 24---------------- 25 26benchtest1 - Lock plus unlock on an unlocked mutex. 27benchtest2 - Lock plus unlock on a locked mutex. 28benchtest3 - Trylock on a locked mutex. 29benchtest4 - Trylock plus unlock on an unlocked mutex. 30 31 32Each test times up to three alternate synchronisation 33implementations as a reference, and then times each of 34the four mutex types provided by the library. Each is 35described below: 36 37Simple Critical Section 38- uses a simple Win32 critical section. There is no 39additional overhead for this case as there is in the 40remaining cases. 41 42POSIX mutex implemented using a Critical Section 43- The old implementation which uses runtime adaptation 44depending on the Windows variant being run on. When 45the pthreads DLL was run on WinNT or higher then 46POSIX mutexes would use Win32 Critical Sections. 47 48POSIX mutex implemented using a Win32 Mutex 49- The old implementation which uses runtime adaptation 50depending on the Windows variant being run on. When 51the pthreads DLL was run on Win9x then POSIX mutexes 52would use Win32 Mutexes (because TryEnterCriticalSection 53is not implemented on Win9x). 54 55PTHREAD_MUTEX_DEFAULT 56PTHREAD_MUTEX_NORMAL 57PTHREAD_MUTEX_ERRORCHECK 58PTHREAD_MUTEX_RECURSIVE 59- The current implementation supports these mutex types. 60The underlying basis of POSIX mutexes is now the same 61irrespective of the Windows variant, and should therefore 62have consistent performance. 63 64 65Semaphore benchtests 66-------------------- 67 68benchtest5 - Timing for various uncontended cases. 69 70 71In all benchtests, the operation is repeated a large 72number of times and an average is calculated. Loop 73overhead is measured and subtracted from all test times. 74 75
README.WINPTHREADS
1 2------------------------------------- 3Using the test suite for winpthreads 4------------------------------------- 5 6This test suite is originally designed for testing compliance: it just says when the tests pass without any further information. 7Because this is inconvenient for work in progress, the behaviour has been modified to show more information for debugging while keeping the changes minimal 8(for syncing purposes) 9 10Procedure: 11---------- 12 131. Enter the winpthreads dir: 14 $ cd winpthreads 152. Build the winpthreads lib 16 $ make 173. Make a copy for the test-suite: 18 $ cp libpthread.a libpthreadGC2.a 194. Enter the test-suite dir: 20 $ cd tests 215. (optional) Clean: 22 $ make clean 236. Build the suite. This will also run the tests. A few might crash so you have to click a dialog away. 24 The tool "runall.exe" will also be built. 25 $ make GC-static 26 To log both the compile results and the asserts: 27 $ make GC-static 2> compile-errors.log 287. Now you have a bunch of .exe and maybe some .pass files. Remove the .pass files. They don't contain much useful yet. 29 $ rm *.pass 308. Re-run the tests in debugging mode. Again some crash dialogs maybe. 31 runall will skip files with already an .pass or .fail output. 32 $ runall . 339. Now 3 types of files will be generated for each source (.c) file (runall excludes itself): 34 The stderr output with the asserts will be logged to corresponding .fail 35 and .pass files. 36 - .pass : the test has passed (exited with 0). 37 - .fail : the test has failed (exited with != 0). 38 - .x : no .exe found. Probably the compile has failed. 39 Note that when a test crashes, a .fail output will be generated, even without failed asserts. 40 41Module testing: 42--------------- 43 44Sometimes you want to test, debug and modify a single test, say once2.c: 451. Copy test.h to the debug test dir: 46 $ cp test.h ../test 472. Copy the file to the debug test dir: 48 $ cp once2.c ../test 493. Enter the debug test dir: 50 $ cd ../test 514. Build and run it: 52 $ make once2.exe 53 $ ./once2.exe 54 55Benchtests: 56----------- 57 58These work, but you have to compile them by hand like this: 59$ make benchlib.o 60$ make benchtest1.exe 61$ make benchtest2.exe 62$ make benchtest3.exe 63$ make benchtest4.exe 64$ make benchtest5.exe