forked from siadat/ipc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.go
More file actions
32 lines (26 loc) · 772 Bytes
/
common.go
File metadata and controls
32 lines (26 loc) · 772 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
package ipc
const (
// https://code.woboq.org/userspace/glibc/sysdeps/unix/sysv/linux/bits/ipc.h.html
// Mode bits for `msgget', `semget', and `shmget'.
IPC_CREAT = 01000 // Create key if key does not exist.
IPC_EXCL = 02000 // Fail if key exists.
IPC_NOWAIT = 04000 // Return error on wait.
// Control commands for `msgctl', `semctl', and `shmctl'.
IPC_RMID = 0 // Remove identifier.
IPC_SET = 1 // Set `ipc_perm' options.
IPC_STAT = 2 // Get `ipc_perm' options.
IPC_INFO = 3 // See ipcs.
// Special key values.
IPC_PRIVATE = 0 // Private key. NOTE: this value is of type __key_t, i.e., ((__key_t) 0)
)
type Msgbuf struct {
Mtype uint64
Mtext []byte
}
type msgbufInternal struct {
Mtype uint64
Mtext []byte
}
type Msginfo struct {
Msgmax int
}