94#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
95# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
98#ifndef PLIBSYS_HEADER_PSEMAPHORE_H
99#define PLIBSYS_HEADER_PSEMAPHORE_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.
struct PSemaphore_ PSemaphore
Semaphore opaque data structure.
P_LIB_API pboolean p_semaphore_acquire(PSemaphore *sem, PError **error)
Acquires (P operation) a semaphore.
enum PSemaphoreAccessMode_ PSemaphoreAccessMode
Enum with semaphore creation modes.
PSemaphoreAccessMode_
Enum with semaphore creation modes.
@ P_SEM_ACCESS_CREATE
Creates semaphore, resets to a given value if exists.
@ P_SEM_ACCESS_OPEN
Opens an existing semaphore or creates one with a given value.
P_LIB_API void p_semaphore_free(PSemaphore *sem)
Frees PSemaphore object.
P_LIB_API void p_semaphore_take_ownership(PSemaphore *sem)
Takes ownership of a semaphore.
P_LIB_API pboolean p_semaphore_release(PSemaphore *sem, PError **error)
Releases (V operation) a semaphore.
P_LIB_API PSemaphore * p_semaphore_new(const pchar *name, pint init_val, PSemaphoreAccessMode mode, PError **error)
Creates a new PSemaphore object.
char pchar
Type for a char.
signed int pboolean
Type for a bool.