MmapShmpDataV1 mmaps open file as fbclock shared memory. Used in tests only.
(fd uintptr)
| 186 | |
| 187 | // MmapShmpDataV1 mmaps open file as fbclock shared memory. Used in tests only. |
| 188 | func MmapShmpDataV1(fd uintptr) (unsafe.Pointer, error) { |
| 189 | data, err := unix.Mmap(int(fd), 0, C.FBCLOCK_SHMDATA_SIZE, unix.PROT_READ, unix.MAP_SHARED) |
| 190 | if err != nil { |
| 191 | return nil, err |
| 192 | } |
| 193 | return unsafe.Pointer(&data[0]), nil |
| 194 | } |
| 195 | |
| 196 | // ReadFBClockData will read Data from mmaped fbclock shared memory. Used in tests only |
| 197 | func ReadFBClockData(shmp unsafe.Pointer) (*DataV2, error) { |
no outgoing calls
searching dependent graphs…