mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 15:17:31 -04:00
unix: add ClockGettime on *bsd and solaris
The same wrapper is already implemented on linux and darwin. Change-Id: Ia986fdfc28767356451d157e53f11e8d9ca86f2c Reviewed-on: https://go-review.googlesource.com/c/sys/+/456795 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Gopher Robot
parent
96e75de924
commit
cffae8ece4
@@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_clock_gettime_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
Reference in New Issue
Block a user