linux(4): Implement __vdso_time

PR:		240769
MFC after:	3 days
This commit is contained in:
Dmitry Chagin 2022-07-04 23:41:32 +03:00
parent d8596171c5
commit 42317e6426

View File

@ -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