pidentd  3.0.19
About: implementation of the RFC1413 identification server (more or less complete rewrite compared to version 2)
  Fossies Dox: pidentd-3.0.19.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

buffer.h
Go to the documentation of this file.
1 /*
2 ** buffer.h - FIFO buffer management routines.
3 **
4 ** Copyright (c) 1997 Peter Eriksson <pen@lysator.liu.se>
5 **
6 ** This program is free software; you can redistribute it and/or
7 ** modify it as you wish - as long as you don't claim that you wrote
8 ** it.
9 **
10 ** This program is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 */
14 
15 #ifndef PIDENTD_BUFFER_H
16 #define PIDENTD_BUFFER_H
17 
18 typedef struct
19 {
20  void **buf;
21  int bsize;
22  int occupied;
23  int nextin;
24  int nextout;
28 } buffer_t;
29 
30 
31 extern int buffer_init(buffer_t *bp, int bsize);
32 extern void buffer_destroy(buffer_t *bp);
33 
34 extern void buffer_put(buffer_t *bp, void *item);
35 extern void *buffer_get(buffer_t *bp);
36 
37 #endif
38 
buffer_t
Definition: buffer.h:18
buffer_get
void * buffer_get(buffer_t *bp)
Definition: buffer.c:62
buffer_init
int buffer_init(buffer_t *bp, int bsize)
Definition: buffer.c:24
buffer_destroy
void buffer_destroy(buffer_t *bp)
Definition: buffer.c:83
buffer_t::nextout
int nextout
Definition: buffer.h:24
buffer_t::occupied
int occupied
Definition: buffer.h:22
buffer_t::mtx
pthread_mutex_t mtx
Definition: buffer.h:25
cma_t_handle
Definition: hp_pthread.h:26
buffer_t::more
pthread_cond_t more
Definition: buffer.h:26
buffer_t::less
pthread_cond_t less
Definition: buffer.h:27
buffer_put
void buffer_put(buffer_t *bp, void *item)
Definition: buffer.c:43
buffer_t::bsize
int bsize
Definition: buffer.h:21
buffer_t::buf
void ** buf
Definition: buffer.h:20
buffer_t::nextin
int nextin
Definition: buffer.h:23