/***************************************************************************** bufpool.h pool data structure ******************************************************************************/ #define POOL_SIZE 100 /* size of allocated space */ #define ERR_POOLEMPTY -1 #define ERR_POOLFULL -2 typedef struct pool *poolptr; typedef struct pool{ int state ; int pool_size; sema_t poolsem; mutex_t poolmut; bufptr front; bufptr rear; buf_t bufs[POOL_SIZE]; } pool_t;