Lines Matching refs:fdi
98 #define FDI_HAS_READ(fdi) ((fdi)->fdi_what & EV_READ) argument
99 #define FDI_HAS_WRITE(fdi) ((fdi)->fdi_what & EV_WRITE) argument
100 #define FDI_HAS_EVENTS(fdi) (FDI_HAS_READ(fdi) || FDI_HAS_WRITE(fdi)) argument
101 #define FDI_TO_SYSEVENTS(fdi) (FDI_HAS_READ(fdi) ? POLLIN : 0) | \ argument
102 (FDI_HAS_WRITE(fdi) ? POLLOUT : 0)
289 struct fd_info *fdi = NULL; in evport_dispatch() local
294 fdi = evmap_io_get_fdinfo_(&base->io, fd); in evport_dispatch()
297 if (fdi != NULL && FDI_HAS_EVENTS(fdi)) { in evport_dispatch()
298 reassociate(epdp, fdi, fd); in evport_dispatch()
300 fdi->pending_idx_plus_1 = 0; in evport_dispatch()
328 struct fd_info *fdi = pevt->portev_user; in evport_dispatch() local
334 fdi->pending_idx_plus_1 = i + 1; in evport_dispatch()
382 struct fd_info *fdi = p; in evport_add() local
386 fdi->fdi_what |= events; in evport_add()
388 return reassociate(evpd, fdi, fd); in evport_add()
399 struct fd_info *fdi = p; in evport_del() local
400 int associated = ! fdi->pending_idx_plus_1; in evport_del()
404 fdi->fdi_what &= ~(events &(EV_READ|EV_WRITE)); in evport_del()
407 if (!FDI_HAS_EVENTS(fdi) && in evport_del()
418 if (FDI_HAS_EVENTS(fdi)) { in evport_del()
419 return (reassociate(evpd, fdi, fd)); in evport_del()
423 if ((fdi->fdi_what & (EV_READ|EV_WRITE)) == 0) { in evport_del()
424 const int i = fdi->pending_idx_plus_1 - 1; in evport_del()
427 fdi->pending_idx_plus_1 = 0; in evport_del()