MCPcopy Create free account
hub / github.com/F-Stack/f-stack / linux_settimeofday

Function linux_settimeofday

freebsd/amd64/linux32/linux32_machdep.c:625–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625int
626linux_settimeofday(struct thread *td, struct linux_settimeofday_args *uap)
627{
628 l_timeval atv32;
629 struct timeval atv, *tvp;
630 struct timezone atz, *tzp;
631 int error;
632
633 if (uap->tp) {
634 error = copyin(uap->tp, &atv32, sizeof(atv32));
635 if (error)
636 return (error);
637 atv.tv_sec = atv32.tv_sec;
638 atv.tv_usec = atv32.tv_usec;
639 tvp = &atv;
640 } else
641 tvp = NULL;
642 if (uap->tzp) {
643 error = copyin(uap->tzp, &atz, sizeof(atz));
644 if (error)
645 return (error);
646 tzp = &atz;
647 } else
648 tzp = NULL;
649 return (kern_settimeofday(td, tvp, tzp));
650}
651
652int
653linux_getrusage(struct thread *td, struct linux_getrusage_args *uap)

Callers

nothing calls this directly

Calls 2

kern_settimeofdayFunction · 0.85
copyinFunction · 0.50

Tested by

no test coverage detected