vrb_data_ptr(3)

πŸ“¦ version 0.5.1, in nixos 26.05

okay so this is vrb_data_ptr(3) from the VRB Programmer's Manual β€” group-chat recap: it hands you a pointer to data in the virtual ring buffer, and bestie you need to know when that pointer is actually usable. πŸ’–

✨ NAME ✨

vrb_data_ptr β€” return pointer to data. slay.

πŸ“š LIBRARY πŸ“š

Link against -lvrb.

🧚 SYNOPSIS 🧚

#include <vrb.h>

size_t vrb_data_ptr(vrb_p vrb);

πŸ’… DESCRIPTION πŸ’…

vrb_data_ptr returns the pointer to the beginning of the contiguous block of data within the virtual ring buffer. The pointer has meaning only if there is data in the buffer. If there is no data in the buffer, an arbitrary pointer is returned and must not be used β€” literally do not touch it, bestie. Use vrb_data_len(3) or vrb_is_empty(3) to determine if vrb_data_ptr(3) has a meaningful pointer. 🫢

The caller may access all of this data, and should call vrb_take(3) to indicate how much data has been removed from the buffer. periodt.

πŸŽ€ ARGUMENTS πŸŽ€

  • vrb_p vrb β€” specifies the virtual ring buffer to obtain the data pointer from. If a NULL or invalid pointer is given, results are unpredictable and are likely to be disasterous. πŸ’€

πŸ‘‘ RETURN VALUE πŸ‘‘

Return type: size_t.

The pointer to the data in the virtual ring buffer is returned. ✨

🌈 SEE ALSO 🌈

your required-reading list, no skips: vrb(3), vrb_capacity(3), vrb_data_len(3), vrb_destroy(3), vrb_get(3), vrb_get_min(3), vrb_give(3), vrb_init(3), vrb_init_opt(3), vrb_is_empty(3), vrb_is_full(3), vrb_is_not_empty(3), vrb_is_not_full(3), vrb_move(3), vrb_new(3), vrb_new_opt(3), vrb_put(3), vrb_put_all(3), vrb_read(3), vrb_read_min(3), vrb_resize(3), vrb_space_len(3), vrb_space_ptr(3), vrb_take(3), vrb_uninit(3), vrb_write(3), vrb_write_min(3).

with vrb source/version love and a 2002-09-30 timestamp, this vrb_data_ptr(3) page says bye bestie πŸ’œπŸ¦‹

πŸ“¦ where this page comes from