59 #ifdef QUEUEBUF_CONF_NUM
60 #define QUEUEBUF_NUM QUEUEBUF_CONF_NUM
62 #define QUEUEBUF_NUM 8
70 #ifdef QUEUEBUFRAM_CONF_NUM
71 #if QUEUEBUFRAM_CONF_NUM>QUEUEBUF_NUM
72 #error "QUEUEBUFRAM_CONF_NUM cannot be greater than QUEUEBUF_NUM"
74 #define QUEUEBUFRAM_NUM QUEUEBUFRAM_CONF_NUM
75 #define WITH_SWAP (QUEUEBUFRAM_NUM < QUEUEBUF_NUM)
78 #define QUEUEBUFRAM_NUM QUEUEBUF_NUM
82 #ifdef QUEUEBUF_CONF_DEBUG
83 #define QUEUEBUF_DEBUG QUEUEBUF_CONF_DEBUG
85 #define QUEUEBUF_DEBUG 0
90 void queuebuf_init(
void);
93 struct queuebuf *queuebuf_new_from_packetbuf_debug(
const char *file,
int line);
94 #define queuebuf_new_from_packetbuf() queuebuf_new_from_packetbuf_debug(__FILE__, __LINE__)
96 struct queuebuf *queuebuf_new_from_packetbuf(
void);
98 void queuebuf_update_attr_from_packetbuf(
struct queuebuf *b);
99 void queuebuf_update_from_packetbuf(
struct queuebuf *b);
101 void queuebuf_to_packetbuf(
struct queuebuf *b);
102 void queuebuf_free(
struct queuebuf *b);
104 void *queuebuf_dataptr(
struct queuebuf *b);
105 int queuebuf_datalen(
struct queuebuf *b);
107 linkaddr_t *queuebuf_addr(
struct queuebuf *b, uint8_t type);
108 packetbuf_attr_t queuebuf_attr(
struct queuebuf *b, uint8_t type);
110 void queuebuf_debug_print(
void);
112 int queuebuf_numfree(
void);
Header file for the Rime buffer (packetbuf) management