Home
last modified time | relevance | path

Searched refs:cbuf (Results 1 – 25 of 36) sorted by relevance

12

/lk-master/lib/cbuf/
A Dcbuf.c43 uint consumed = modpow2((uint)(cbuf->head - cbuf->tail), cbuf->len_pow2); in cbuf_space_avail()
48 return modpow2((uint)(cbuf->head - cbuf->tail), cbuf->len_pow2); in cbuf_space_used()
66 if (cbuf->head >= cbuf->tail) { in cbuf_write()
94 cbuf->head = INC_POINTER(cbuf, cbuf->head, write_len); in cbuf_write()
98 if (cbuf->head != cbuf->tail) in cbuf_write()
126 if (cbuf->tail != cbuf->head) { in cbuf_read()
146 cbuf->tail = INC_POINTER(cbuf, cbuf->tail, read_len); in cbuf_read()
203 cbuf->buf[cbuf->head] = c; in cbuf_write_char()
205 cbuf->head = INC_POINTER(cbuf, cbuf->head, 1); in cbuf_write_char()
230 if (cbuf->tail != cbuf->head) { in cbuf_read_char()
[all …]
A Drules.mk6 $(LOCAL_DIR)/cbuf.c
/lk-master/lib/cbuf/include/lib/
A Dcbuf.h18 typedef struct cbuf { struct
37 void cbuf_initialize(cbuf_t *cbuf, size_t len);
49 void cbuf_initialize_etc(cbuf_t *cbuf, size_t len, void *buf);
81 size_t cbuf_peek(cbuf_t *cbuf, iovec_t *regions);
109 size_t cbuf_space_avail(cbuf_t *cbuf);
119 size_t cbuf_space_used(cbuf_t *cbuf);
128 static inline size_t cbuf_size(cbuf_t *cbuf) { in cbuf_size() argument
129 return (1UL << cbuf->len_pow2); in cbuf_size()
140 static inline void cbuf_reset(cbuf_t *cbuf) { in cbuf_reset() argument
141 cbuf_read(cbuf, NULL, cbuf_size(cbuf), false); in cbuf_reset()
[all …]
/lk-master/app/tests/
A Dcbuf_tests.c37 cbuf_t cbuf; in cbuf_tests() local
41 cbuf_initialize(&cbuf, 16); in cbuf_tests()
43 ASSERT_EQ(15UL, cbuf_space_avail(&cbuf)); in cbuf_tests()
47 ASSERT_EQ(7UL, cbuf_space_avail(&cbuf)); in cbuf_tests()
53 ASSERT_EQ(0UL, cbuf_space_avail(&cbuf)); in cbuf_tests()
58 ASSERT_EQ(0UL, cbuf_space_avail(&cbuf)); in cbuf_tests()
63 ASSERT_EQ(3UL, cbuf_read(&cbuf, buf, 3, false)); in cbuf_tests()
69 ASSERT_EQ(12UL, cbuf_read(&cbuf, buf, 32, false)); in cbuf_tests()
75 cbuf_reset(&cbuf); in cbuf_tests()
77 ASSERT_EQ(15UL, cbuf_space_avail(&cbuf)); in cbuf_tests()
[all …]
A Drules.mk23 lib/cbuf
/lk-master/platform/bcm28xx/
A Drules.mk10 lib/cbuf
14 lib/cbuf \
/lk-master/lib/io/
A Drules.mk6 lib/cbuf
/lk-master/platform/pc/
A Dconsole.c270 char cbuf[200]; in printf_xy() local
275 result = vsprintf(cbuf, fmt, parms); in printf_xy()
278 puts_xy(x, y, attr, cbuf); in printf_xy()
A Duart.c26 struct cbuf rx_buf;
27 struct cbuf tx_buf;
A Drules.mk13 lib/cbuf
/lk-master/platform/qemu-mips/
A Drules.mk9 lib/cbuf
/lk-master/platform/microblaze/
A Drules.mk8 lib/cbuf
/lk-master/platform/or1ksim/
A Drules.mk8 lib/cbuf \
/lk-master/app/lkboot/
A Drules.mk9 lib/cbuf \
/lk-master/lib/debug/
A Ddebug.c109 uint8_t cbuf[16]; in hexdump() member
125 char c = u.cbuf[i]; in hexdump()
/lk-master/lib/minip/
A Drules.mk6 lib/cbuf \
/lk-master/platform/amlogic-s912d/
A Drules.mk6 lib/cbuf \
/lk-master/platform/alterasoc/
A Drules.mk10 lib/cbuf \
/lk-master/platform/sifive/
A Drules.mk10 MODULE_DEPS += lib/cbuf
A Duart.c35 static struct cbuf uart_rx_buf;
/lk-master/platform/qemu-virt-m68k/
A Drules.mk8 MODULE_DEPS += lib/cbuf
/lk-master/platform/lpc43xx/
A Drules.mk28 lib/cbuf
/lk-master/platform/stellaris/
A Drules.mk50 lib/cbuf \
/lk-master/lib/io/include/lib/
A Dio.h63 typedef struct cbuf cbuf_t;
/lk-master/platform/qemu-virt-arm/
A Drules.mk29 lib/cbuf \

Completed in 33 milliseconds

12