-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshm.h
More file actions
39 lines (29 loc) · 855 Bytes
/
Copy pathshm.h
File metadata and controls
39 lines (29 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _SYS_SHM_H
#define _SYS_SHM_H
#include <linux/shm.h>
#include <stdint.h>
#include <sys/types.h>
__BEGIN_DECLS
#ifndef shmid_ds
# define shmid_ds shmid64_ds
#endif
/* Shared memory control operations. */
#undef shmctl
#define shmctl libandroid_shmctl
extern int shmctl(int shmid, int cmd, struct shmid_ds* buf);
/* Get shared memory area identifier. */
#undef shmget
#define shmget libandroid_shmget
extern int shmget(key_t key, size_t size, int shmflg);
/* Attach shared memory segment. */
#undef shmat
#define shmat libandroid_shmat
extern void *shmat(int shmid, void const* shmaddr, int shmflg);
/* Detach shared memory segment. */
#undef shmdt
#define shmdt libandroid_shmdt
extern int shmdt(void const* shmaddr);
extern int libandroid_shmat_fd(int shmid, size_t* out_size);
extern int libandroid_shmdt_fd(int fd);
__END_DECLS
#endif