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

Function sys_setitimer

freebsd/kern/kern_time.c:797–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795};
796#endif
797int
798sys_setitimer(struct thread *td, struct setitimer_args *uap)
799{
800 struct itimerval aitv, oitv;
801 int error;
802
803 if (uap->itv == NULL) {
804 uap->itv = uap->oitv;
805 return (sys_getitimer(td, (struct getitimer_args *)uap));
806 }
807
808 if ((error = copyin(uap->itv, &aitv, sizeof(struct itimerval))))
809 return (error);
810 error = kern_setitimer(td, uap->which, &aitv, &oitv);
811 if (error != 0 || uap->oitv == NULL)
812 return (error);
813 return (copyout(&oitv, uap->oitv, sizeof(struct itimerval)));
814}
815
816int
817kern_setitimer(struct thread *td, u_int which, struct itimerval *aitv,

Callers

nothing calls this directly

Calls 4

sys_getitimerFunction · 0.85
kern_setitimerFunction · 0.85
copyinFunction · 0.50
copyoutFunction · 0.50

Tested by

no test coverage detected