| 1 |
// Copyright 2021 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
// Constants for fetching time values on Windows for use in asm code. |
| 6 |
|
| 7 |
// See https://wrkhpi.wordpress.com/2007/08/09/getting-os-information-the-kuser_shared_data-structure/ |
| 8 |
// Archived copy at: |
| 9 |
// http://web.archive.org/web/20210411000829/https://wrkhpi.wordpress.com/2007/08/09/getting-os-information-the-kuser_shared_data-structure/ |
| 10 |
|
| 11 |
// Must read hi1, then lo, then hi2. The snapshot is valid if hi1 == hi2. |
| 12 |
// Or, on 64-bit, just read lo:hi1 all at once atomically. |
| 13 |
#define _INTERRUPT_TIME 0x7ffe0008 |
| 14 |
#define _SYSTEM_TIME 0x7ffe0014 |
| 15 |
#define time_lo 0 |
| 16 |
#define time_hi1 4 |
| 17 |
#define time_hi2 8 |