IDZEBRA  2.2.7
Functions | Variables
tstlockscope.c File Reference

tests scope of fcntl locks.. Either "process" or "thread" More...

#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <yaz/log.h>
#include <yaz/test.h>
#include <fcntl.h>

Go to the source code of this file.

Functions

static int file_lock (int fd, int type, int cmd)
 
void * run_func (void *arg)
 
void tst (void)
 
int main (int argc, char **argv)
 

Variables

int fd
 
const char * scope = "unknown"
 

Detailed Description

tests scope of fcntl locks.. Either "process" or "thread"

Definition in file tstlockscope.c.

Function Documentation

◆ file_lock()

static int file_lock ( int  fd,
int  type,
int  cmd 
)
static

Definition at line 42 of file tstlockscope.c.

References fd.

Referenced by run_func(), and tst().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 89 of file tstlockscope.c.

References tst().

◆ run_func()

void* run_func ( void *  arg)

Definition at line 52 of file tstlockscope.c.

References fd, file_lock(), and scope.

Referenced by tst().

◆ tst()

void tst ( void  )

Definition at line 61 of file tstlockscope.c.

References fd, file_lock(), run_func(), and scope.

Referenced by main().

Variable Documentation

◆ fd

int fd

◆ scope

const char* scope = "unknown"