Implement CCLite 0.1.2 IPC primitives
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#ifndef CCLITE_IPC_H
|
||||
#define CCLITE_IPC_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CCL_IPC_SUCCESS 0
|
||||
#define CCL_IPC_CREATE_FAILED 2001
|
||||
#define CCL_IPC_OPEN_FAILED 2002
|
||||
#define CCL_IPC_MAP_FAILED 2003
|
||||
#define CCL_IPC_TIMEOUT 2004
|
||||
#define CCL_IPC_BAD_HANDLE 2005
|
||||
#define CCL_IPC_UNSUPPORTED 9001
|
||||
|
||||
int ccl_ipc_shm_create(const char *name, size_t byte_size, void **out_handle, void **out_payload);
|
||||
int ccl_ipc_shm_open(const char *name, size_t byte_size, void **out_handle, void **out_payload);
|
||||
int ccl_ipc_shm_close(void *handle);
|
||||
|
||||
int ccl_ipc_event_create(const char *name, int initial_state, void **out_handle);
|
||||
int ccl_ipc_event_open(const char *name, void **out_handle);
|
||||
int ccl_ipc_event_wait(void *handle, int timeout_ms);
|
||||
int ccl_ipc_event_signal(void *handle);
|
||||
int ccl_ipc_event_reset(void *handle);
|
||||
int ccl_ipc_event_close(void *handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user