Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linux/linux_event.c
Show First 20 Lines • Show All 730 Lines • ▼ Show 20 Lines | timerfd_close(struct file *fp, struct thread *td) | ||||
tfd = fp->f_data; | tfd = fp->f_data; | ||||
if (fp->f_type != DTYPE_LINUXTFD || tfd == NULL) | if (fp->f_type != DTYPE_LINUXTFD || tfd == NULL) | ||||
return (EINVAL); | return (EINVAL); | ||||
timespecclear(&tfd->tfd_time.it_value); | timespecclear(&tfd->tfd_time.it_value); | ||||
timespecclear(&tfd->tfd_time.it_interval); | timespecclear(&tfd->tfd_time.it_interval); | ||||
mtx_lock(&tfd->tfd_lock); | |||||
callout_drain(&tfd->tfd_callout); | callout_drain(&tfd->tfd_callout); | ||||
mtx_unlock(&tfd->tfd_lock); | |||||
seldrain(&tfd->tfd_sel); | seldrain(&tfd->tfd_sel); | ||||
knlist_destroy(&tfd->tfd_sel.si_note); | knlist_destroy(&tfd->tfd_sel.si_note); | ||||
fp->f_ops = &badfileops; | fp->f_ops = &badfileops; | ||||
mtx_destroy(&tfd->tfd_lock); | mtx_destroy(&tfd->tfd_lock); | ||||
free(tfd, M_EPOLL); | free(tfd, M_EPOLL); | ||||
▲ Show 20 Lines • Show All 299 Lines • Show Last 20 Lines |