diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2020-02-13 13:40:59 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-13 13:40:59 +0000 |
| commit | 81f49abaaac2b88062bd1b07f451d9527ed1c9ce (patch) | |
| tree | fcfbe2c6aaad9ea3d4dffd941567f2a48e6f14f6 /util/qemu-timer-common.c | |
| parent | 7ce9ce89930ce260af839fb3e3e5f9101f5c69a0 (diff) | |
| parent | be02cda3afde60d219786e23c3f8edb53aec8e17 (diff) | |
| download | focaccia-qemu-81f49abaaac2b88062bd1b07f451d9527ed1c9ce.tar.gz focaccia-qemu-81f49abaaac2b88062bd1b07f451d9527ed1c9ce.zip | |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* various small fixes and cleanups * fixes for the ucode revision patch from the previous pull request # gpg: Signature made Wed 12 Feb 2020 15:30:24 GMT # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: target/i386: enable monitor and ucode revision with -cpu max target/i386: check for availability of MSR_IA32_UCODE_REV as an emulated MSR target/i386: fix TCG UCODE_REV access build: move TARGET_GPROF to config-host.mak exec: do not define use_icount for user-mode emulation minikconf: accept alnum identifiers Remove support for CLOCK_MONOTONIC not being defined seqlock: fix seqlock_write_unlock_impl function vl: Don't mismatch g_strsplit()/g_free() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/qemu-timer-common.c')
| -rw-r--r-- | util/qemu-timer-common.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/util/qemu-timer-common.c b/util/qemu-timer-common.c index 06d084d364..baf3317f74 100644 --- a/util/qemu-timer-common.c +++ b/util/qemu-timer-common.c @@ -49,14 +49,11 @@ int use_rt_clock; static void __attribute__((constructor)) init_get_clock(void) { + struct timespec ts; + use_rt_clock = 0; -#ifdef CLOCK_MONOTONIC - { - struct timespec ts; - if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { - use_rt_clock = 1; - } + if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { + use_rt_clock = 1; } -#endif } #endif |