Date: Mon, 4 Jul 2022 20:43:45 GMT From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 42317e642645 - main - linux(4): Implement __vdso_time Message-ID: <202207042043.264Khjtc080601@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=42317e642645b36e711b5dd560d06a303a492e0f commit 42317e642645b36e711b5dd560d06a303a492e0f Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-07-04 20:41:32 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-07-04 20:41:32 +0000 linux(4): Implement __vdso_time PR: 240769 MFC after: 3 days --- sys/compat/linux/linux_vdso_gtod.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_vdso_gtod.inc b/sys/compat/linux/linux_vdso_gtod.inc index f101fe81f7f8..8a3840edd87d 100644 --- a/sys/compat/linux/linux_vdso_gtod.inc +++ b/sys/compat/linux/linux_vdso_gtod.inc @@ -372,7 +372,14 @@ __vdso_getcpu(uint32_t *cpu, uint32_t *node, void *cache) int __vdso_time(long *tm) { + struct timeval tv; + int error; - return (__vdso_time_fallback(tm)); + error = freebsd_gettimeofday(&tv, NULL); + if (error != 0) + return (__vdso_time_fallback(tm)); + if (tm != NULL) + *tm = tv.tv_sec; + return (tv.tv_sec); } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207042043.264Khjtc080601>