#include "Thread.h"
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <unistd.h>
#include <errno.h>
#include <stdarg.h>
#include <time.h>
#include <sys/timeb.h>
Go to the source code of this file.
Classes | |
struct | Options |
Macros | |
#define | ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) |
#define | assert(a, b, c, d) myassert(__FILE__, __LINE__, a, b, c, d) |
#define | assert1(a, b, c, d, e) myassert(__FILE__, __LINE__, a, b, c, d, e) |
#define | LOGA_DEBUG 0 |
#define | LOGA_INFO 1 |
#define | mysleep sleep |
#define | START_TIME_TYPE struct timeval |
#define | WINAPI |
Functions | |
thread_return_type | cond_secondary (void *n) |
long | elapsed (START_TIME_TYPE start_time) |
void | getopts (int argc, char **argv) |
int | main (int argc, char **argv) |
static thread_return_type WINAPI | mutex_secondary (void *n) |
void | myassert (char *filename, int lineno, char *description, int value, char *format,...) |
void | MyLog (int LOGA_level, char *format,...) |
static thread_return_type WINAPI | sem_secondary (void *n) |
START_TIME_TYPE | start_clock (void) |
int | test_cond (struct Options options) |
int | test_mutex (struct Options options) |
int | test_sem (struct Options options) |
void | usage (void) |
void | write_test_result (void) |
Variables | |
char * | cur_output = output |
int | failures = 0 |
START_TIME_TYPE | global_start_time |
struct Options | options |
char | output [3000] |
int | tests = 0 |
FILE * | xml |
Unit tests for threading
Definition in file thread.c.
thread_return_type cond_secondary | ( | void * | n | ) |
long elapsed | ( | START_TIME_TYPE | start_time | ) |
|
static |
void myassert | ( | char * | filename, |
int | lineno, | ||
char * | description, | ||
int | value, | ||
char * | format, | ||
... | |||
) |
|
static |
START_TIME_TYPE start_clock | ( | void | ) |
START_TIME_TYPE global_start_time |
struct Options options |