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

Function sys_ktimer_create

freebsd/kern/kern_time.c:1158–1180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156};
1157#endif
1158int
1159sys_ktimer_create(struct thread *td, struct ktimer_create_args *uap)
1160{
1161 struct sigevent *evp, ev;
1162 int id;
1163 int error;
1164
1165 if (uap->evp == NULL) {
1166 evp = NULL;
1167 } else {
1168 error = copyin(uap->evp, &ev, sizeof(ev));
1169 if (error != 0)
1170 return (error);
1171 evp = &ev;
1172 }
1173 error = kern_ktimer_create(td, uap->clock_id, evp, &id, -1);
1174 if (error == 0) {
1175 error = copyout(&id, uap->timerid, sizeof(int));
1176 if (error != 0)
1177 kern_ktimer_delete(td, id);
1178 }
1179 return (error);
1180}
1181
1182int
1183kern_ktimer_create(struct thread *td, clockid_t clock_id, struct sigevent *evp,

Callers

nothing calls this directly

Calls 4

kern_ktimer_createFunction · 0.85
kern_ktimer_deleteFunction · 0.85
copyinFunction · 0.50
copyoutFunction · 0.50

Tested by

no test coverage detected