mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
linux(4): Implement __vdso_time
PR: 240769 MFC after: 3 days
This commit is contained in:
parent
d8596171c5
commit
42317e6426
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue