70#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
71# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
74#ifndef PLIBSYS_HEADER_PSHMBUFFER_H
75#define PLIBSYS_HEADER_PSHMBUFFER_H
struct PError_ PError
Opaque data structure for an error object.
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS.
#define P_LIB_API
Exports a symbol from a shared library.
P_LIB_API pssize p_shm_buffer_get_used_space(PShmBuffer *buf, PError **error)
Gets used space in the shared memory buffer.
P_LIB_API void p_shm_buffer_clear(PShmBuffer *buf)
Clears all data in the buffer and fills it with zeros.
P_LIB_API pint p_shm_buffer_read(PShmBuffer *buf, ppointer storage, psize len, PError **error)
Tries to read data from a shared memory buffer.
P_LIB_API pssize p_shm_buffer_write(PShmBuffer *buf, ppointer data, psize len, PError **error)
Tries to write data into a shared memory buffer.
P_LIB_API pssize p_shm_buffer_get_free_space(PShmBuffer *buf, PError **error)
Gets free space in the shared memory buffer.
P_LIB_API PShmBuffer * p_shm_buffer_new(const pchar *name, psize size, PError **error)
Creates a new PShmBuffer structure.
P_LIB_API void p_shm_buffer_take_ownership(PShmBuffer *buf)
Takes ownership of a shared memory buffer.
struct PShmBuffer_ PShmBuffer
Shared memory buffer opaque data structure.
P_LIB_API void p_shm_buffer_free(PShmBuffer *buf)
Frees PShmBuffer structure.
signed int pssize
Type for a platform independent signed size_t.
char pchar
Type for a char.
unsigned int psize
Type for a platform independent size_t.
void * ppointer
Type for a pointer.