2004-06-08 23:54:24 +00:00
|
|
|
#ifndef foomemblockqhfoo
|
|
|
|
|
#define foomemblockqhfoo
|
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
|
|
#include "memblock.h"
|
|
|
|
|
|
|
|
|
|
struct memblockq;
|
|
|
|
|
|
2004-06-15 00:29:01 +00:00
|
|
|
struct memblockq* memblockq_new(size_t maxlength, size_t base, size_t prebuf);
|
2004-06-08 23:54:24 +00:00
|
|
|
void memblockq_free(struct memblockq* bq);
|
|
|
|
|
|
|
|
|
|
void memblockq_push(struct memblockq* bq, struct memchunk *chunk, size_t delta);
|
|
|
|
|
|
|
|
|
|
int memblockq_pop(struct memblockq* bq, struct memchunk *chunk);
|
|
|
|
|
int memblockq_peek(struct memblockq* bq, struct memchunk *chunk);
|
|
|
|
|
void memblockq_drop(struct memblockq *bq, size_t length);
|
|
|
|
|
|
|
|
|
|
void memblockq_shorten(struct memblockq *bq, size_t length);
|
|
|
|
|
void memblockq_empty(struct memblockq *bq);
|
|
|
|
|
|
2004-06-15 00:29:01 +00:00
|
|
|
int memblockq_is_readable(struct memblockq *bq);
|
|
|
|
|
int memblockq_is_writable(struct memblockq *bq, size_t length);
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2004-06-18 17:12:50 +00:00
|
|
|
uint32_t memblockq_get_delay(struct memblockq *bq);
|
|
|
|
|
uint32_t memblockq_get_length(struct memblockq *bq);
|
2004-06-15 15:18:33 +00:00
|
|
|
|
2004-06-23 23:17:30 +00:00
|
|
|
uint32_t memblockq_missing_to(struct memblockq *bq, size_t qlen);
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
#endif
|