LIBRARY
-lvrbSYNOPSIS
#include <vrb.h>int vrb_put_all(vrb_p vrb, char *source, size_t size);
DESCRIPTION
vrb_put_all puts caller provided data into a virtual ring buffer only if all the data will fit.ARGUMENTS
vrb_p vrbspecifies which virtual ring buffer.
char *source
specifies the location where to copy the data from.
size_t size
specifies the length of data provided by the caller.
RETURN VALUE
intIf the data fits and is copied, 0 is returned, otherwise -1 is returned.
ERRORS
If an error is returned, then errno will have one of the following values:- EINVAL
- An invalid virtual ring buffer pointer was specified.
- ENOSPC
- The virtual ring buffer does not have enough space to hold all of the data.