1package cap 2 3import ( 4 "syscall" 5 6 "kernel.org/pub/linux/libs/security/libcap/psx" 7) 8 9// multisc provides syscalls overridable for testing purposes that 10// support a single kernel security state for all OS threads. 11// We use this version when we are cgo compiling because 12// we need to manage the native C pthreads too. 13var multisc = &syscaller{ 14 w3: psx.Syscall3, 15 w6: psx.Syscall6, 16 r3: syscall.RawSyscall, 17 r6: syscall.RawSyscall6, 18} 19 20// singlesc provides a single threaded implementation. Users should 21// take care to ensure the thread is locked and marked nogc. 22var singlesc = &syscaller{ 23 w3: syscall.RawSyscall, 24 w6: syscall.RawSyscall6, 25 r3: syscall.RawSyscall, 26 r6: syscall.RawSyscall6, 27} 28