My Project: dynamics.mod/NewtonDynamics/source/pthreads.2/tests/benchtest4.c File Reference

My Project

Macros | Functions | Variables
benchtest4.c File Reference
`#include "test.h"`
`#include <sys/timeb.h>`
`#include "benchtest.h"`

## Macros

#define | PTW32_MUTEX_TYPES
#define | ITERATIONS 10000000L
#define | GetDurationMilliSecs(_TStart, _TStop)
#define | TESTSTART { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++;
#define | TESTSTOP }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; }

## Functions

void | oldRunTest (char *testNameString, int mType)
void | runTest (char *testNameString, int mType)
int | main (int argc, char *argv[])

## Variables

pthread_mutex_t | mx
old_mutex_t | ox
pthread_mutexattr_t | ma
PTW32_STRUCT_TIMEB | currSysTimeStart
PTW32_STRUCT_TIMEB | currSysTimeStop
long | durationMilliSecs
long | overHeadMilliSecs = 0

## Macro Definition Documentation

## § GetDurationMilliSecs

#define GetDurationMilliSecs | ( |  | _TStart,
|  |  | _TStop
| ) |  |

Value:
((long)((_TStop.time*1000+_TStop.millitm) \
- (_TStart.time*1000+_TStart.millitm)))

## § ITERATIONS

#define ITERATIONS 10000000L

## § PTW32_MUTEX_TYPES

#define PTW32_MUTEX_TYPES

## § TESTSTART

#define TESTSTART { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++;

## § TESTSTOP

#define TESTSTOP }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; }

## Function Documentation

## § main()

int main | ( | int | argc,
|  | char * | argv[]
| ) |  |

## § oldRunTest()

void oldRunTest | ( | char * | testNameString,
|  | int | mType
| ) |  |

## § runTest()

void runTest | ( | char * | testNameString,
|  | int | mType
| ) |  |

## Variable Documentation

## § currSysTimeStart

PTW32_STRUCT_TIMEB currSysTimeStart

## § currSysTimeStop

PTW32_STRUCT_TIMEB currSysTimeStop

## § durationMilliSecs

long durationMilliSecs

## § ma

pthread_mutexattr_t ma

## § mx

pthread_mutex_t mx

## § overHeadMilliSecs

long overHeadMilliSecs = 0

## § ox

old_mutex_t ox