IDZEBRA 2.2.11
tstflock.c File Reference
#include <assert.h>
#include <stdlib.h>
#include <yaz/test.h>
#include <yaz/log.h>
#include <time.h>
#include <fcntl.h>
#include <idzebra/flock.h>
#include <string.h>

Go to the source code of this file.

Macros

#define NUM_THREADS   100

Functions

static void small_sleep (void)
void * run_func (void *arg)
static void tst_thread (int num, int write_flag)
static void tst (void)
void fork_tst (void)
int main (int argc, char **argv)

Variables

static char seq [1000]
static char * seqp = 0
int test_fd = 0

Macro Definition Documentation

◆ NUM_THREADS

#define NUM_THREADS   100

Definition at line 65 of file tstflock.c.

Referenced by tst_thread().

Function Documentation

◆ fork_tst()

void fork_tst ( void )

Definition at line 216 of file tstflock.c.

References tst().

Referenced by main().

◆ main()

int main ( int argc,
char ** argv )

Definition at line 242 of file tstflock.c.

References fork_tst(), O_BINARY, test_fd, and zebra_flock_init().

◆ run_func()

void * run_func ( void * arg)

◆ small_sleep()

void small_sleep ( void )
static

Definition at line 74 of file tstflock.c.

Referenced by run_func().

◆ tst()

void tst ( void )
static

Definition at line 197 of file tstflock.c.

References seq, and tst_thread().

Referenced by fork_tst(), and main().

◆ tst_thread()

void tst_thread ( int num,
int write_flag )
static

Definition at line 149 of file tstflock.c.

References NUM_THREADS, run_func(), seq, and seqp.

Referenced by tst().

Variable Documentation

◆ seq

char seq[1000]
static

Definition at line 62 of file tstflock.c.

Referenced by tst(), and tst_thread().

◆ seqp

char* seqp = 0
static

Definition at line 63 of file tstflock.c.

Referenced by run_func(), and tst_thread().

◆ test_fd

int test_fd = 0

Definition at line 72 of file tstflock.c.

Referenced by main(), and run_func().