diff options
author | marha <marha@users.sourceforge.net> | 2011-07-18 10:51:09 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-18 10:51:09 +0200 |
commit | 3c0d2312573b81e3067bea610a58b1940c075e05 (patch) | |
tree | 3f025a27d813374f225957801226aa8ee829a33a /pthreads/tests/benchtest5.c | |
parent | ba033884541714680fd7552ab9d6c8817650f7d8 (diff) | |
parent | 88101146f2ec7d53ffb793e365f05097ffd35fd3 (diff) | |
download | vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.tar.gz vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.tar.bz2 vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
X11/Xfuncproto.h.in
X11/configure.ac
X11/keysymdef.h
freetype/include/freetype/internal/pcftypes.h
freetype/src/cache/ftcbasic.c
freetype/src/cache/ftccmap.c
mesalib/src/glsl/ir.h
mesalib/src/glsl/link_functions.cpp
mesalib/src/mesa/main/dlist.c
mesalib/src/mesa/program/prog_optimize.c
mesalib/src/mesa/state_tracker/st_program.c
pthreads/Makefile
Diffstat (limited to 'pthreads/tests/benchtest5.c')
-rw-r--r-- | pthreads/tests/benchtest5.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pthreads/tests/benchtest5.c b/pthreads/tests/benchtest5.c index 7700fdeaa..d262baf11 100644 --- a/pthreads/tests/benchtest5.c +++ b/pthreads/tests/benchtest5.c @@ -53,25 +53,25 @@ sem_t sema; HANDLE w32sema; -struct _timeb currSysTimeStart; -struct _timeb currSysTimeStop; +PTW32_STRUCT_TIMEB currSysTimeStart; +PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; int one = 1; int zero = 0; -#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \ - - (_TStart.time*1000+_TStart.millitm)) +#define GetDurationMilliSecs(_TStart, _TStop) ((long)((_TStop.time*1000+_TStop.millitm) \ + - (_TStart.time*1000+_TStart.millitm))) /* * Dummy use of j, otherwise the loop may be removed by the optimiser * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; _ftime(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; _ftime(&currSysTimeStop); if (j + k == i) j++; } + }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void @@ -115,7 +115,7 @@ main (int argc, char *argv[]) */ assert((w32sema = CreateSemaphore(NULL, (long) 0, (long) ITERATIONS, NULL)) != 0); TESTSTART - assert(ReleaseSemaphore(w32sema, 1, NULL) != zero); + assert((ReleaseSemaphore(w32sema, 1, NULL),1) == one); TESTSTOP assert(CloseHandle(w32sema) != 0); @@ -124,7 +124,7 @@ main (int argc, char *argv[]) assert((w32sema = CreateSemaphore(NULL, (long) ITERATIONS, (long) ITERATIONS, NULL)) != 0); TESTSTART - assert(WaitForSingleObject(w32sema, INFINITE) == WAIT_OBJECT_0); + assert((WaitForSingleObject(w32sema, INFINITE),1) == one); TESTSTOP assert(CloseHandle(w32sema) != 0); @@ -133,7 +133,7 @@ main (int argc, char *argv[]) assert(sem_init(&sema, 0, 0) == 0); TESTSTART - assert(sem_post(&sema) == zero); + assert((sem_post(&sema),1) == one); TESTSTOP assert(sem_destroy(&sema) == 0); @@ -142,7 +142,7 @@ main (int argc, char *argv[]) assert(sem_init(&sema, 0, ITERATIONS) == 0); TESTSTART - assert(sem_wait(&sema) == zero); + assert((sem_wait(&sema),1) == one); TESTSTOP assert(sem_destroy(&sema) == 0); |