File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ package shm
2
+
3
+ import (
4
+ "syscall"
5
+ )
6
+
7
+ // System call constants.
8
+ const (
9
+ sysShmAt = syscall .SYS_SHMAT
10
+ sysShmCtl = syscall .SYS_SHMCTL
11
+ sysShmDt = syscall .SYS_SHMDT
12
+ sysShmGet = syscall .SYS_SHMGET
13
+ )
14
+
15
+ // Perm is used to pass permission information to IPC operations.
16
+ type Perm struct {
17
+ // Key.
18
+ Key int32
19
+ // Owner's user ID.
20
+ Uid uint32
21
+ // Owner's group ID.
22
+ Gid uint32
23
+ // Creator's user ID.
24
+ Cuid uint32
25
+ // Creator's group ID.
26
+ Cgid uint32
27
+ // Read/write permission.
28
+ Mode uint32
29
+ // Sequence number.
30
+ Seq uint16
31
+ // Padding.
32
+ Pad1 uint16
33
+ // Reserved.
34
+ GlibcReserved1 uint64
35
+ // Reserved.
36
+ GlibcReserved2 uint64
37
+ }
38
+
39
+ // IdDs describes shared memory segment.
40
+ type IdDs struct {
41
+ // Operation permission struct.
42
+ Perm Perm
43
+ // Size of segment in bytes.
44
+ SegSz uint64
45
+ // Last attach time.
46
+ Atime int64
47
+ // Last detach time.
48
+ Dtime int64
49
+ // Last change time.
50
+ Ctime int64
51
+ // Pid of creator.
52
+ Cpid int32
53
+ // Pid of last shmat/shmdt.
54
+ Lpid int32
55
+ // Number of current attaches.
56
+ Nattch uint64
57
+ // Reserved.
58
+ GlibcReserved5 uint64
59
+ // Reserved.
60
+ GlibcReserved6 uint64
61
+ }
You can’t perform that action at this time.
0 commit comments