Lines Matching refs:fdtol

2045 	struct filedesc_to_leader *fdtol;
2054 fdtol = p->p_fdtol;
2055 MPASS(fdtol != NULL);
2058 KASSERT(fdtol->fdl_refcount > 0,
2060 fdtol->fdl_refcount));
2061 if (fdtol->fdl_refcount == 1 &&
2082 if (fdtol->fdl_refcount == 1) {
2094 if (fdtol->fdl_holdcount > 0) {
2096 * Ensure that fdtol->fdl_leader remains
2099 fdtol->fdl_wakeup = 1;
2100 sx_sleep(fdtol, FILEDESC_LOCK(fdp), PLOCK,
2105 fdtol->fdl_refcount--;
2106 if (fdtol->fdl_refcount == 0 &&
2107 fdtol->fdl_holdcount == 0) {
2108 fdtol->fdl_next->fdl_prev = fdtol->fdl_prev;
2109 fdtol->fdl_prev->fdl_next = fdtol->fdl_next;
2111 fdtol = NULL;
2114 if (fdtol != NULL)
2115 free(fdtol, M_FILEDESC_TO_LEADER);
2366 struct filedesc_to_leader *fdtol;
2391 fdtol = td->td_proc->p_fdtol;
2392 if (fdtol != NULL) {
2399 for (fdtol = fdtol->fdl_next;
2400 fdtol != td->td_proc->p_fdtol;
2401 fdtol = fdtol->fdl_next) {
2402 if ((fdtol->fdl_leader->p_flag &
2405 fdtol->fdl_holdcount++;
2413 (caddr_t)fdtol->fdl_leader, F_UNLCK, &lf,
2416 fdtol->fdl_holdcount--;
2417 if (fdtol->fdl_holdcount == 0 &&
2418 fdtol->fdl_wakeup != 0) {
2419 fdtol->fdl_wakeup = 0;
2420 wakeup(fdtol);
3135 struct filedesc_to_leader *fdtol;
3137 fdtol = malloc(sizeof(struct filedesc_to_leader),
3139 fdtol->fdl_refcount = 1;
3140 fdtol->fdl_holdcount = 0;
3141 fdtol->fdl_wakeup = 0;
3142 fdtol->fdl_leader = leader;
3145 fdtol->fdl_next = old->fdl_next;
3146 fdtol->fdl_prev = old;
3147 old->fdl_next = fdtol;
3148 fdtol->fdl_next->fdl_prev = fdtol;
3151 fdtol->fdl_next = fdtol;
3152 fdtol->fdl_prev = fdtol;
3154 return (fdtol);