Skip to content

Commit 6938dae

Browse files
jclarkgopherbot
authored andcommitted
unix: add missing constants used with struct Timex on Linux
This provides definitions for Linux of two groups of constants, which are used with struct Timex (used with the adjtimex and clock_adjtime system calls): the ADJ_* constants are used for the modes field; the STA_* constants are used for the status field. The constants are documented in the adjtimex(2) man page. Fixes golang/go#58012 Change-Id: I054f0c40f9cfd9360a0bb10716a08e19584c0fff Reviewed-on: https://go-review.googlesource.com/c/sys/+/464241 Run-TryBot: Tobias Klauser <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Auto-Submit: Tobias Klauser <[email protected]>
1 parent 01b330b commit 6938dae

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

unix/linux/types.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,41 @@ type ItimerSpec C.struct_itimerspec
477477

478478
type Itimerval C.struct_itimerval
479479

480+
const (
481+
ADJ_OFFSET = C.ADJ_OFFSET
482+
ADJ_FREQUENCY = C.ADJ_FREQUENCY
483+
ADJ_MAXERROR = C.ADJ_MAXERROR
484+
ADJ_ESTERROR = C.ADJ_ESTERROR
485+
ADJ_STATUS = C.ADJ_STATUS
486+
ADJ_TIMECONST = C.ADJ_TIMECONST
487+
ADJ_TAI = C.ADJ_TAI
488+
ADJ_SETOFFSET = C.ADJ_SETOFFSET
489+
ADJ_MICRO = C.ADJ_MICRO
490+
ADJ_NANO = C.ADJ_NANO
491+
ADJ_TICK = C.ADJ_TICK
492+
ADJ_OFFSET_SINGLESHOT = C.ADJ_OFFSET_SINGLESHOT
493+
ADJ_OFFSET_SS_READ = C.ADJ_OFFSET_SS_READ
494+
)
495+
496+
const (
497+
STA_PLL = C.STA_PLL
498+
STA_PPSFREQ = C.STA_PPSFREQ
499+
STA_PPSTIME = C.STA_PPSTIME
500+
STA_FLL = C.STA_FLL
501+
STA_INS = C.STA_INS
502+
STA_DEL = C.STA_DEL
503+
STA_UNSYNC = C.STA_UNSYNC
504+
STA_FREQHOLD = C.STA_FREQHOLD
505+
STA_PPSSIGNAL = C.STA_PPSSIGNAL
506+
STA_PPSJITTER = C.STA_PPSJITTER
507+
STA_PPSWANDER = C.STA_PPSWANDER
508+
STA_PPSERROR = C.STA_PPSERROR
509+
STA_CLOCKERR = C.STA_CLOCKERR
510+
STA_NANO = C.STA_NANO
511+
STA_MODE = C.STA_MODE
512+
STA_CLK = C.STA_CLK
513+
)
514+
480515
const (
481516
TIME_OK = C.TIME_OK
482517
TIME_INS = C.TIME_INS

unix/ztypes_linux.go

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)