mirror of
https://github.com/moby/moby.git
synced 2026-08-08 09:01:44 +00:00
Unfortunately also brings in golang.org/x/tools as a dependency, due to go-winio using a "tools.go" file. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
32 lines
622 B
Go
32 lines
622 B
Go
//go:build windows
|
|
|
|
package etw
|
|
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
type eventDataDescriptorType uint8
|
|
|
|
const (
|
|
eventDataDescriptorTypeUserData eventDataDescriptorType = iota
|
|
eventDataDescriptorTypeEventMetadata
|
|
eventDataDescriptorTypeProviderMetadata
|
|
)
|
|
|
|
type eventDataDescriptor struct {
|
|
ptr ptr64
|
|
size uint32
|
|
dataType eventDataDescriptorType
|
|
_ uint8
|
|
_ uint16
|
|
}
|
|
|
|
func newEventDataDescriptor(dataType eventDataDescriptorType, buffer []byte) eventDataDescriptor {
|
|
return eventDataDescriptor{
|
|
ptr: ptr64{ptr: unsafe.Pointer(&buffer[0])},
|
|
size: uint32(len(buffer)),
|
|
dataType: dataType,
|
|
}
|
|
}
|