• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/kern/

Lines Matching refs:kqueue

94 MALLOC_DEFINE(M_KQUEUE, "kqueue", "memory for kqueue system");
96 static inline void kqlock(struct kqueue *kq);
97 static inline void kqunlock(struct kqueue *kq);
99 static int kqlock2knoteuse(struct kqueue *kq, struct knote *kn);
100 static int kqlock2knoteusewait(struct kqueue *kq, struct knote *kn);
101 static int kqlock2knotedrop(struct kqueue *kq, struct knote *kn);
102 static int knoteuse2kqlock(struct kqueue *kq, struct knote *kn);
104 static void kqueue_wakeup(struct kqueue *kq);
130 static int kevent_callback(struct kqueue *kq, struct kevent *kevp, void *data);
131 static void kevent_continue(struct kqueue *kq, void *data, int error);
133 static int kevent_process(struct kqueue *kq, kevent_callback_t callback,
218 * kqueue/note lock attributes and implementations
222 * the knote "inuse" count and status use the kqueue lock.
229 kqlock(struct kqueue *kq)
235 kqunlock(struct kqueue *kq)
251 kqlock2knoteuse(struct kqueue *kq, struct knote *kn)
271 kqlock2knoteusewait(struct kqueue *kq, struct knote *kn)
290 * still alive - but the kqueue lock is taken
294 knoteuse2kqlock(struct kqueue *kq, struct knote *kn)
320 kqlock2knotedrop(struct kqueue *kq, struct knote *kn)
348 struct kqueue *kq = kn->kn_kq;
379 struct kqueue *kq = (struct kqueue *)kn->kn_fp->f_data;
390 struct kqueue *kq = (struct kqueue *)kn->kn_fp->f_data;
743 struct kqueue *
747 struct kqueue *kq;
749 MALLOC_ZONE(kq, struct kqueue *, sizeof(struct kqueue), M_KQUEUE, M_WAITOK);
751 bzero(kq, sizeof(struct kqueue));
770 * kqueue_dealloc - detach all knotes from a kqueue and free it
773 * this kqueue. If we find one, we try to drop it. But
777 * not contain any more references to this kqueue (either
780 * Assumes no new events are being added to the kqueue.
784 kqueue_dealloc(struct kqueue *kq)
834 FREE_ZONE(kq, sizeof(struct kqueue), M_KQUEUE);
838 kqueue(struct proc *p, __unused struct kqueue_args *uap, register_t *retval)
840 struct kqueue *kq;
962 kevent_continue(__unused struct kqueue *kq, void *data, int error)
1005 struct kqueue *kq;
1086 * caller holds a reference on the kqueue
1090 kevent_callback(__unused struct kqueue *kq, struct kevent *kevp, void *data)
1113 * kevent_register - add a new event to a kqueue
1116 * the kqueue via a knote data structure.
1123 * caller holds a reference on the kqueue
1127 kevent_register(struct kqueue *kq, struct kevent *kev, __unused struct proc *ctxp)
1234 /* existing knote - get kqueue lock */
1264 /* kqueue unlocked */
1293 * kevent_process - process the triggered events in a kqueue
1302 * caller holds a reference on the kqueue.
1303 * kqueue locked on entry and exit - but may be dropped
1307 kevent_process(struct kqueue *kq,
1381 * Got a valid triggered knote with the kqueue
1417 * With the kqueue still locked, move any knotes
1442 struct kqueue *kq = (struct kqueue *)data;
1478 * kevent_scan - scan and wait for events in a kqueue
1480 * Process the triggered events in a kqueue.
1492 kevent_scan(struct kqueue *kq,
1617 struct kqueue *kq = (struct kqueue *)fp->f_data;
1640 struct kqueue *kq = (struct kqueue *)fg->fg_data;
1649 * The callers has taken a use-count reference on this kqueue and will donate it
1650 * to the kqueue we are being added to. This keeps the kqueue from closing until
1656 struct kqueue *kq = (struct kqueue *)kn->kn_fp->f_data;
1657 struct kqueue *parentkq = kn->kn_kq;
1667 * ceiling protocol. When a kqueue is inserted into another,
1669 * into another kqueue at a lower level than the potenial
1706 struct kqueue *kq = (struct kqueue *)fp->f_data;
1725 * Called with the kqueue locked
1728 kqueue_wakeup(struct kqueue *kq)
1767 struct kqueue *kq = kn->kn_kq;
1826 struct kqueue *kq = kn->kn_kq;
1901 struct kqueue *kq = kn->kn_kq;
1926 /* called with kqueue lock held */
1930 struct kqueue *kq = kn->kn_kq;
1937 /* called with kqueue lock held */
1945 /* called with kqueue lock held */
1949 struct kqueue *kq = kn->kn_kq;
1960 /* called with kqueue lock held */
1964 struct kqueue *kq = kn->kn_kq;
1985 kq_lck_grp = lck_grp_alloc_init("kqueue", kq_lck_grp_attr);
2289 fill_kqueueinfo(struct kqueue *kq, struct kqueue_info * kinfo)