nfs-ganesha 1.4
Defines | Functions | Variables

test_rw.c File Reference

#include <stdio.h>
#include <pthread.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include "RW_Lock.h"
#include "log.h"

Go to the source code of this file.

Defines

#define MAX_WRITTERS   3
#define MAX_READERS   5
#define NB_ITER   40
#define MARGE_SECURITE   10

Functions

void * thread_writter (void *arg)
void * thread_reader (void *arg)
int main (int argc, char *argv[])

Variables

rw_lock_t lock
int OkWrite = 0
int OkRead = 0

Define Documentation

#define MARGE_SECURITE   10

Definition at line 46 of file test_rw.c.

#define MAX_READERS   5

Definition at line 44 of file test_rw.c.

#define MAX_WRITTERS   3

Definition at line 43 of file test_rw.c.

#define NB_ITER   40

Definition at line 45 of file test_rw.c.


Function Documentation

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

Definition at line 85 of file test_rw.c.

void* thread_reader ( void *  arg)

Definition at line 69 of file test_rw.c.

void* thread_writter ( void *  arg)

Definition at line 53 of file test_rw.c.


Variable Documentation

Definition at line 48 of file test_rw.c.

int OkRead = 0

Definition at line 51 of file test_rw.c.

int OkWrite = 0

Definition at line 50 of file test_rw.c.