SeqIDSocketControlMessage encodes the SequenceID into a socket control message and specifies SCM_TS_OPT_ID as the Control Message Header type
(seqID uint32, soob []byte)
| 223 | h := (*unix.Cmsghdr)(unsafe.Pointer(&soob[0])) |
| 224 | h.Level = unix.SOL_SOCKET |
| 225 | h.Type = unix.SCM_TS_OPT_ID |
| 226 | h.SetLen(unix.CmsgLen(SizeofSeqID)) |
| 227 | data := soob[unix.CmsgLen(0):unix.CmsgLen(SizeofSeqID)] |
| 228 | binary.NativeEndian.PutUint32(data, seqID) |
| 229 | } |
| 230 | |
| 231 | // pollFunc matches unix.Ppoll so tests can drive the EINTR restart path |
| 232 | type pollFunc func(fds []unix.PollFd, timeout *unix.Timespec, sigmask *unix.Sigset_t) (int, error) |
| 233 | |
| 234 | func waitForHWTS(connFd int) error { |
| 235 | return pollForHWTS(connFd, unix.Ppoll) |
no outgoing calls
searching dependent graphs…