zhangmeng
2019-08-26 3bd1f29975c0eaa6af8c99776b099faafbbfc250
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
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs shared.go
 
package shm
 
type sharedBlock struct {
    Next      uint32
    Prev      uint32
    DoneRead  uint32
    DoneWrite uint32
    Size      uint64
    Flags     [40]uint8
}
 
type sharedMem struct {
    Version     uint32
    X__padding0 uint32
    BlockCount  uint32
    X__padding1 uint32
    BlockSize   uint64
    ReadStart   uint32
    ReadEnd     uint32
    WriteStart  uint32
    WriteEnd    uint32
    SemSignal   [16]byte
    SemAvail    [16]byte
    Flags       [14]uint32
}
 
const (
    sharedHeaderSize = 0x80
    sharedFlagsSize  = len(sharedMem{}.Flags)
    blockHeaderSize  = 0x40
    blockFlagsSize   = len(sharedBlock{}.Flags)
 
    version = uint32((^uint(0)>>32)&0x80000000) | 0x00000001
)