vendor: cilium/ebbf 4032b1d8aae306b7bb94a2a11002932caf88c644

full diff: 60c3aa43f4...4032b1d8aa

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2020-04-04 00:31:39 +02:00
parent b0e71d7977
commit 4fb3410f65
25 changed files with 2304 additions and 349 deletions

23
vendor/github.com/cilium/ebpf/internal/syscall.go generated vendored Normal file
View File

@@ -0,0 +1,23 @@
package internal
import (
"runtime"
"unsafe"
"github.com/cilium/ebpf/internal/unix"
)
// BPF wraps SYS_BPF.
//
// Any pointers contained in attr must use the Pointer type from this package.
func BPF(cmd int, attr unsafe.Pointer, size uintptr) (uintptr, error) {
r1, _, errNo := unix.Syscall(unix.SYS_BPF, uintptr(cmd), uintptr(attr), size)
runtime.KeepAlive(attr)
var err error
if errNo != 0 {
err = errNo
}
return r1, err
}