prod_cons.h File Reference

#include <pthread.h>
#include <semaphore.h>

Include dependency graph for prod_cons.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  prod_cons_t

Functions

prod_cons_tcreate_prod_cons (int sz)
void put (prod_cons_t *prod_cons, void *val)
void * get (prod_cons_t *prod_cons)
void destroy_prod_cons (prod_cons_t *prod_cons)


Function Documentation

prod_cons_t* create_prod_cons int  sz  ) 
 

Definition at line 8 of file prod_cons.c.

References prod_cons_t::buf_size, prod_cons_t::buffer, prod_cons_t::cons_mutex, prod_cons_t::cons_pos, prod_cons_t::cons_sem, prod_cons_t::prod_mutex, prod_cons_t::prod_pos, and prod_cons_t::prod_sem.

Referenced by initCacheStruct().

void destroy_prod_cons prod_cons_t prod_cons  ) 
 

Definition at line 99 of file prod_cons.c.

References prod_cons_t::buffer, prod_cons_t::cons_sem, and prod_cons_t::prod_sem.

Referenced by destroyCache().

void* get prod_cons_t prod_cons  ) 
 

Definition at line 61 of file prod_cons.c.

References prod_cons_t::buf_size, prod_cons_t::buffer, prod_cons_t::cons_mutex, prod_cons_t::cons_pos, prod_cons_t::cons_sem, and prod_cons_t::prod_sem.

Referenced by writerThread().

void put prod_cons_t prod_cons,
void *  val
 

Definition at line 28 of file prod_cons.c.

References prod_cons_t::buf_size, prod_cons_t::buffer, prod_cons_t::cons_sem, prod_cons_t::prod_mutex, prod_cons_t::prod_pos, and prod_cons_t::prod_sem.

Referenced by destroyCache().


Generated on Tue Jan 17 19:25:34 2006 for Void by  doxygen 1.4.6