-
Notifications
You must be signed in to change notification settings - Fork 1
/
inshm.h
43 lines (31 loc) · 806 Bytes
/
inshm.h
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
40
41
42
/******************************************************************************
Copyright (c) 2018, Ioannis Nompelis
All rights reserved.
******************************************************************************/
#ifndef _INSHM_H_
#define _INSHM_H_
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <stdio.h>
#include <stdlib.h>
#define SHMSIZE 27
struct inSHM_segment_s {
int shmid;
key_t key;
size_t size;
void *shm;
struct shmid_ds ds;
};
int inSHM_CreateSegmentPrivate(
struct inSHM_segment_s * inshm,
size_t size,
int iverb );
int inSHM_DetachSegment(
struct inSHM_segment_s * inshm,
int iverb );
int inSHM_AttachSegment(
struct inSHM_segment_s * inshm,
int shmid,
int iverb );
#endif