summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-ecdsa-sk.c
diff options
context:
space:
mode:
authorcheloha <cheloha@openbsd.org>2020-06-22 21:16:07 +0000
committercheloha <cheloha@openbsd.org>2020-06-22 21:16:07 +0000
commit8dca5d44636110d0ff0cfe71785c8f18da7ca99e (patch)
tree30226e4bdfd4d9e481f3abe43d2e583e583b7b5f /usr.bin/ssh/ssh-ecdsa-sk.c
parentAdd opalcons(4), a driver for the OPAL console. (diff)
downloadwireguard-openbsd-8dca5d44636110d0ff0cfe71785c8f18da7ca99e.tar.xz
wireguard-openbsd-8dca5d44636110d0ff0cfe71785c8f18da7ca99e.zip
timecounting: add gettime(9), getuptime(9)
time_second and time_uptime are used widely in the tree. This is a problem on 32-bit platforms because time_t is 64-bit, so there is a potential split-read whenever they are used at or below IPL_CLOCK. Here are two replacement interfaces: gettime(9) and getuptime(9). The "get" prefix signifies that they do not read the hardware timecounter, i.e. they are fast and low-res. The lack of a unit (e.g. micro, nano) signifies that they yield a plain time_t. As an optimization on LP64 platforms we can just return time_second or time_uptime, as a single read is atomic. On 32-bit platforms we need to do the lockless read loop and get the values from the timecounter. In a subsequent diff these will be substituted for time_second and time_uptime almost everywhere in the kernel. With input from visa@ and dlg@. ok kettenis@
Diffstat (limited to 'usr.bin/ssh/ssh-ecdsa-sk.c')
0 files changed, 0 insertions, 0 deletions