Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

cf_pthread.c File Reference

Pthread function and datatype wrappers. More...

#include "config.h"
#include "defines.h"
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
#include "cf_pthread.h"
#include "hashlib.h"
#include "readline.h"
#include "utils.h"
#include "fo_server.h"
#include "serverlib.h"

Go to the source code of this file.

Functions

void cf_mutex_init (const u_char *name, t_cf_mutex *mutex)
void cf_mutex_destroy (t_cf_mutex *mutex)
void cf_rwlock_init (const u_char *name, t_cf_rwlock *rwlock)
void cf_rwlock_destroy (t_cf_rwlock *rwlock)
void cf_lock_mutex (const u_char *file, const int line, t_cf_mutex *mutex)
void cf_unlock_mutex (const u_char *file, const int line, t_cf_mutex *mutex)
void cf_rwlock_rdlock (const u_char *file, const int line, t_cf_rwlock *rwlock)
void cf_rwlock_wrlock (const u_char *file, const int line, t_cf_rwlock *rwlock)
void cf_rwlock_unlock (const u_char *file, const int line, t_cf_rwlock *rwlock)


Detailed Description

Pthread function and datatype wrappers.

Author:
Christian Kruse, <cjk@wwwtech.de>
This file contains some functions to debug pthread locking functions

Definition in file cf_pthread.c.


Function Documentation

void cf_lock_mutex const u_char *  file,
const int  line,
t_cf_mutex mutex
 

This function locks a mutex

Parameters:
file The file name
line The line number
mutex The mutex object

Definition at line 58 of file cf_pthread.c.

void cf_mutex_destroy t_cf_mutex mutex  ) 
 

The destructor for the t_cf_mutex class

Definition at line 44 of file cf_pthread.c.

void cf_mutex_init const u_char *  name,
t_cf_mutex mutex
 

Initialization function for the t_cf_mutex

Parameters:
name The name of the mutex
mutex The t_cf_mutex object

Definition at line 40 of file cf_pthread.c.

void cf_rwlock_destroy t_cf_rwlock rwlock  ) 
 

This function is the destructor for the read-write lock class

Parameters:
rwlock The read-write lock object

Definition at line 53 of file cf_pthread.c.

void cf_rwlock_init const u_char *  name,
t_cf_rwlock rwlock
 

This function initializes a rwlock

Parameters:
name The name of the read-write lock
rwlock The read-write lock object

Definition at line 49 of file cf_pthread.c.

void cf_rwlock_rdlock const u_char *  file,
const int  line,
t_cf_rwlock rwlock
 

This function locks a rwlock shared

Parameters:
file The file name
line The line number
rwlock The read-write lock

Definition at line 125 of file cf_pthread.c.

void cf_rwlock_unlock const u_char *  file,
const int  line,
t_cf_rwlock rwlock
 

This function unlocks a read-write lock

Parameters:
file The file name
line The line number
rwlock The read-write lock

Definition at line 191 of file cf_pthread.c.

void cf_rwlock_wrlock const u_char *  file,
const int  line,
t_cf_rwlock rwlock
 

This function locks a read-write lock writable

Parameters:
file The file name
line The line number
rwlock The read-write lock

Definition at line 158 of file cf_pthread.c.

void cf_unlock_mutex const u_char *  file,
const int  line,
t_cf_mutex mutex
 

This function unlocks a mutex

Parameters:
file The file name
line The line number
mutex The mutex object

Definition at line 92 of file cf_pthread.c.


Generated on Sun Apr 25 16:37:39 2004 for Classic Forum by doxygen 1.3.5