summaryrefslogtreecommitdiff
path: root/ipc.h
blob: eb96839cdc4927d7ff81a7bd1b9ca693dbe0d259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* SPDX-License-Identifier: GPL-2.0 */

/** \file ipc.h inter process communication and shared memory routines */

/** possible values for shm_attach() */
enum shm_attach_mode {ATTACH_RO, ATTACH_RW};

int mutex_new(void);
void mutex_destroy(int id);
void mutex_lock(int id);
void mutex_unlock(int id);
int shm_new(size_t size);
int shm_attach(int id, enum shm_attach_mode mode, void **result);
int shm_detach(void *addr);
int shm_destroy(int id);
int shm_size(int id, size_t *result);
size_t shm_get_shmmax(void);