Lines Matching full:first
19 uint8_t first, last; in dbuf_alloc() local
21 first = hdr->first; in dbuf_alloc()
23 if (first == last) { in dbuf_alloc()
32 /* LLL has not consumed the first PDU. Revert back the `last` so in dbuf_alloc()
33 * that LLL still consumes the first PDU while the caller of in dbuf_alloc()
37 * 1. LLL runs before `pdu->last` is reverted, then `pdu->first` in dbuf_alloc()
40 * 2. LLL runs after `pdu->last` is reverted, then `pdu->first` in dbuf_alloc()
44 hdr->last = first; in dbuf_alloc()
46 first_latest = hdr->first; in dbuf_alloc()
47 if (first_latest != first) { in dbuf_alloc()
63 uint8_t first; in dbuf_latest_get() local
65 first = hdr->first; in dbuf_latest_get()
66 if (first != hdr->last) { in dbuf_latest_get()
69 cfg_idx = first; in dbuf_latest_get()
71 first += 1U; in dbuf_latest_get()
72 if (first == DOUBLE_BUFFER_SIZE) { in dbuf_latest_get()
73 first = 0U; in dbuf_latest_get()
75 hdr->first = first; in dbuf_latest_get()
82 return &hdr->data[first * hdr->elem_size]; in dbuf_latest_get()