Searched refs:cbuf (Results 1 – 25 of 36) sorted by relevance
12
/lk-master/lib/cbuf/ |
A D | cbuf.c | 43 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 D | rules.mk | 6 $(LOCAL_DIR)/cbuf.c
|
/lk-master/lib/cbuf/include/lib/ |
A D | cbuf.h | 18 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 D | cbuf_tests.c | 37 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 D | rules.mk | 23 lib/cbuf
|
/lk-master/platform/bcm28xx/ |
A D | rules.mk | 10 lib/cbuf 14 lib/cbuf \
|
/lk-master/lib/io/ |
A D | rules.mk | 6 lib/cbuf
|
/lk-master/platform/pc/ |
A D | console.c | 270 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 D | uart.c | 26 struct cbuf rx_buf; 27 struct cbuf tx_buf;
|
A D | rules.mk | 13 lib/cbuf
|
/lk-master/platform/qemu-mips/ |
A D | rules.mk | 9 lib/cbuf
|
/lk-master/platform/microblaze/ |
A D | rules.mk | 8 lib/cbuf
|
/lk-master/platform/or1ksim/ |
A D | rules.mk | 8 lib/cbuf \
|
/lk-master/app/lkboot/ |
A D | rules.mk | 9 lib/cbuf \
|
/lk-master/lib/debug/ |
A D | debug.c | 109 uint8_t cbuf[16]; in hexdump() member 125 char c = u.cbuf[i]; in hexdump()
|
/lk-master/lib/minip/ |
A D | rules.mk | 6 lib/cbuf \
|
/lk-master/platform/amlogic-s912d/ |
A D | rules.mk | 6 lib/cbuf \
|
/lk-master/platform/alterasoc/ |
A D | rules.mk | 10 lib/cbuf \
|
/lk-master/platform/sifive/ |
A D | rules.mk | 10 MODULE_DEPS += lib/cbuf
|
A D | uart.c | 35 static struct cbuf uart_rx_buf;
|
/lk-master/platform/qemu-virt-m68k/ |
A D | rules.mk | 8 MODULE_DEPS += lib/cbuf
|
/lk-master/platform/lpc43xx/ |
A D | rules.mk | 28 lib/cbuf
|
/lk-master/platform/stellaris/ |
A D | rules.mk | 50 lib/cbuf \
|
/lk-master/lib/io/include/lib/ |
A D | io.h | 63 typedef struct cbuf cbuf_t;
|
/lk-master/platform/qemu-virt-arm/ |
A D | rules.mk | 29 lib/cbuf \
|
Completed in 33 milliseconds
12