Mon 16 Mar 11:09:06 CET 2026
This commit is contained in:
parent
3e5ec62ea2
commit
9a3aa38ba1
30
src/shm.h
Normal file
30
src/shm.h
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef _SHM_H
|
||||||
|
#define _SHM_H
|
||||||
|
// SHM support
|
||||||
|
typedef enum {
|
||||||
|
SMS_EMPTY=0,
|
||||||
|
SMS_ROOT,
|
||||||
|
SMS_C,
|
||||||
|
SMS_R,
|
||||||
|
SMS_DS,
|
||||||
|
SMS_DS_DATA,
|
||||||
|
SMS_FS,
|
||||||
|
SMS_FS_DATA,
|
||||||
|
SMS_M,
|
||||||
|
SMS_M_DATA,
|
||||||
|
SMS_SIG
|
||||||
|
} shm_section_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int type; // shm_section_t
|
||||||
|
int addr;
|
||||||
|
int size;
|
||||||
|
} shm_header_entry_t;
|
||||||
|
|
||||||
|
#define SHM_MAX_SECTIONS 256
|
||||||
|
|
||||||
|
int allocate_shm(char *key, int bufsize, void **buf);
|
||||||
|
int open_shm(char *key, int *bufsize, void **buf);
|
||||||
|
void close_shm(int fd);
|
||||||
|
void *allocate_section(void *buf,shm_section_t type,int size);
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user