Searched refs:kq (Results 1 - 25 of 54) sorted by relevance

123

/freebsd-12-stable/usr.bin/diff/
H A Dpr.h33 int kq; member in struct:pr
H A Dpr.c89 pr->kq = kqueue();
90 if (pr->kq == -1)
95 if (kevent(pr->kq, pr->e, 1, NULL, 0, NULL) == -1)
116 if (kevent(pr->kq, NULL, 0, pr->e, 1, NULL) == -1)
119 close(pr->kq);
/freebsd-12-stable/contrib/netbsd-tests/kernel/kqueue/
H A Dt_ioctl.c56 int kq; local
59 RL(kq = kqueue());
66 RL(ioctl(kq, KFILTER_BYFILTER, &km));
71 ATF_REQUIRE_EQ(ioctl(kq, KFILTER_BYFILTER, &km), -1);
94 int kq; local
96 RL(kq = kqueue());
102 RL(ioctl(kq, KFILTER_BYNAME, &km));
107 ATF_REQUIRE_EQ(ioctl(kq, KFILTER_BYNAME, &km), -1);
H A Dt_proc3.c60 int kq, status; local
64 RL(kq = kqueue());
68 RL(kevent(kq, &ke, 1, NULL, 0, NULL));
86 RL(kevent(kq, NULL, 0, &ke, 1, &timeout));
87 RL(close(kq));
H A Dt_proc2.c93 int kq, status; local
97 RL(kq = kqueue());
112 RL(kevent(kq, &ke, 1, NULL, 0, &timeout));
120 RL(kevent(kq, NULL, 0, &ke, 1, &timeout));
121 RL(close(kq));
H A Dt_vnode.c24 static int kq = -1; variable
47 kq = kqueue();
48 if (kq < 0) {
55 return kevent(kq, eventlist, 1, NULL, 0, NULL);
80 (void)close(kq);
99 ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, &ts) != -1);
123 ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, &ts) != -1);
147 ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, &ts) != -1);
171 ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, &ts) != -1);
194 ATF_REQUIRE(kevent(kq, NUL
[all...]
H A Dt_proc1.c102 int kq, status; local
105 RL(kq = kqueue());
122 RL(kevent(kq, event, 1, NULL, 0, NULL));
126 RL(kevent(kq, NULL, 0, event, 1, NULL));
H A Dt_sig.c71 int kq, n, num, status; local
89 RL(kq = kqueue());
94 RL(ioctl(kq, KFILTER_BYNAME, &km));
109 RL(kevent(kq, event, 1, NULL, 0, NULL));
120 RL(n = kevent(kq, NULL, 0, event, 1, &timeout));
/freebsd-12-stable/sys/kern/
H A Dkern_event.c85 * This lock is used if multiple kq locks are required. This possibly
105 static int kqueue_register(struct kqueue *kq, struct kevent *kev,
108 static void kqueue_release(struct kqueue *kq, int locked);
109 static void kqueue_destroy(struct kqueue *kq);
110 static void kqueue_drain(struct kqueue *kq, struct thread *td);
111 static int kqueue_expand(struct kqueue *kq, struct filterops *fops,
114 static int kqueue_scan(struct kqueue *kq, int maxevents,
118 static void kqueue_wakeup(struct kqueue *kq);
148 static int knote_attach(struct knote *kn, struct kqueue *kq);
225 #define KQ_LOCK(kq) d
381 struct kqueue *kq = kn->kn_fp->f_data; local
396 struct kqueue *kq = kn->kn_fp->f_data; local
405 struct kqueue *kq = kn->kn_fp->f_data; local
532 struct kqueue *kq; local
797 struct kqueue *kq; local
963 kqueue_init(struct kqueue *kq) argument
976 struct kqueue *kq; local
1214 kqueue_kevent(struct kqueue *kq, struct thread *td, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout) argument
1258 struct kqueue *kq; local
1277 struct kqueue kq = {}; local
1377 kqueue_register(struct kqueue *kq, struct kevent *kev, struct thread *td, int mflag) argument
1642 struct kqueue *kq; local
1662 kqueue_release(struct kqueue *kq, int locked) argument
1676 kqueue_schedtask(struct kqueue *kq) argument
1695 kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int mflag) argument
1765 struct kqueue *kq; local
1789 kqueue_scan(struct kqueue *kq, int maxevents, struct kevent_copyops *k_ops, const struct timespec *tsp, struct kevent *keva, struct thread *td) argument
2041 struct kqueue *kq; local
2082 kqueue_drain(struct kqueue *kq, struct thread *td) argument
2145 kqueue_destroy(struct kqueue *kq) argument
2166 struct kqueue *kq = fp->f_data; local
2210 kqueue_wakeup(struct kqueue *kq) argument
2241 struct kqueue *kq; local
2504 struct kqueue *kq; local
2565 struct kqueue *kq; local
2601 knote_attach(struct knote *kn, struct kqueue *kq) argument
2635 struct kqueue *kq; local
2671 struct kqueue *kq = kn->kn_kq; local
2685 struct kqueue *kq = kn->kn_kq; local
2724 struct kqueue *kq; local
[all...]
/freebsd-12-stable/lib/libc/sys/
H A Dkevent.c45 kevent(int kq, const struct kevent *changelist, int nchanges, argument
51 __libc_interposing[INTERPOS_kevent])(kq, changelist, nchanges,
/freebsd-12-stable/tests/sys/fifo/
H A Dfifo_kqueue.c58 int kq = kqueue(); local
59 ATF_REQUIRE(kq >= 0);
65 ATF_REQUIRE(kevent(kq, kev, 2, NULL, 0, NULL) == 0);
69 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
87 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
96 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
103 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
119 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
135 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), NULL) == 1);
143 ATF_REQUIRE(close(kq)
159 int kq = kqueue(); local
228 int kq, p[2]; local
292 int kq = kqueue(); local
345 int kq = kqueue(); local
[all...]
/freebsd-12-stable/contrib/netbsd-tests/lib/libc/sys/
H A Dt_kevent.c66 int kq; local
68 ATF_REQUIRE((kq = kqueue()) != -1);
70 ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, NULL) != -1);
71 ATF_REQUIRE(kevent(kq, NULL, 0, &ev, 1, NULL) == 1);
84 int s[2], storage, status, kq; local
90 ATF_REQUIRE((kq = kqueue()) != -1);
118 kq = *(int *)CMSG_DATA(msg);
119 printf("child (pid %d): received kq fd %d\n", getpid(), kq);
136 *(int *)CMSG_DATA(msg) = kq;
164 int fd, kq; local
[all...]
/freebsd-12-stable/contrib/netbsd-tests/kernel/kqueue/write/
H A Dt_pipe.c60 int kq, n; local
63 RL(kq = kqueue());
67 ATF_REQUIRE_EQ_MSG((n = kevent(kq, event, 1, NULL, 0, NULL)),
84 int kq, n; local
89 RL(kq = kqueue());
92 RL(kevent(kq, event, 1, NULL, 0, NULL));
103 RL(n = kevent(kq, NULL, 0, event, 1, NULL));
125 int kq; local
128 RL(kq = kqueue());
131 RL(kevent(kq, even
[all...]
H A Dt_fifo.c63 int kq, n, fd, status; local
67 RL(kq = kqueue());
79 RL(kevent(kq, event, 1, NULL, 0, NULL));
82 RL(n = kevent(kq, NULL, 0, event, 1, NULL));
H A Dt_ttypty.c60 int status, kq, n; local
84 RL(kq = kqueue());
87 RL(kevent(kq, event, 1, NULL, 0, NULL));
89 RL(n = kevent(kq, NULL, 0, event, 1, NULL));
/freebsd-12-stable/tools/regression/sockets/kqueue/
H A Dkqueue.c104 test_evfilt_read(int kq, int fd[2], const char *socktype) argument
113 if (kevent(kq, &ke, 1, NULL, 0, NULL) == -1)
122 i = kevent(kq, NULL, 0, &ke, 1, &ts);
148 i = kevent(kq, NULL, 0, &ke, 1, &ts);
173 i = kevent(kq, NULL, 0, &ke, 1, &ts);
183 if (kevent(kq, &ke, 1, NULL, 0, NULL) == -1)
189 test_evfilt_write(int kq, int fd[2], const char *socktype) argument
198 if (kevent(kq, &ke, 1, NULL, 0, NULL) == -1)
207 i = kevent(kq, NULL, 0, &ke, 1, &ts);
233 i = kevent(kq, NUL
255 int kq, sv[2]; local
[all...]
/freebsd-12-stable/contrib/netbsd-tests/kernel/kqueue/read/
H A Dt_file2.c56 int fd1, fd2, kq; local
66 RL(kq = kqueue());
69 RL(kevent(kq, event, 1, NULL, 0, NULL));
H A Dt_fifo.c60 int kq, n, fd; local
67 RL(kq = kqueue());
70 RL(kevent(kq, event, 1, NULL, 0, NULL));
78 RL(n = kevent(kq, NULL, 0, event, 1, NULL));
H A Dt_pipe.c56 int kq, n; local
59 RL(kq = kqueue());
62 RL(kevent(kq, event, 1, NULL, 0, NULL));
68 RL(n = kevent(kq, NULL, 0, event, 1, NULL));
/freebsd-12-stable/contrib/openbsm/bin/auditdistd/
H A Dsubr.c190 int error, kq; local
198 kq = kqueue();
199 if (kq == -1) {
205 if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) {
208 (void)close(kq);
212 wait_for_dir_kq = kq;
223 int error, kq; local
234 kq = kqueue();
235 if (kq == -1) {
243 if (kevent(kq, e
[all...]
/freebsd-12-stable/tests/sys/kern/pipe/
H A Dpipe_kqueue_test.c55 int kq = kqueue(); local
56 ATF_REQUIRE(kq >= 0);
61 ATF_REQUIRE(kevent(kq, kev, 1, NULL, 0, NULL) == 0);
65 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
83 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
92 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
99 r = kevent(kq, NULL, 0, kev, nitems(kev), &(struct timespec) { 0, 0 });
115 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
131 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev),
140 ATF_REQUIRE(close(kq)
155 int kq = kqueue(); local
197 int kq = kqueue(); local
248 int kq, p[2]; local
301 int kq, p[2]; local
[all...]
H A Dpipe_fstat_bug_test.c58 int kq; local
124 kq = kqueue();
125 if (kq == -1)
131 if (kevent(kq, &ke, 1, NULL, 0, NULL) != 0)
139 if (kevent(kq, NULL, 0, &event, 1, NULL) != 1)
/freebsd-12-stable/tests/sys/mqueue/
H A Dmqtest4.c34 int kq, status; local
56 kq = kqueue();
61 status = kevent(kq, &kev, 1, NULL, 0, NULL);
67 status = kevent(kq, NULL, 0, &kev, 1, NULL);
91 kq = kqueue();
93 status = kevent(kq, &kev, 1, NULL, 0, NULL);
102 status = kevent(kq, NULL, 0, &kev, 1, NULL);
/freebsd-12-stable/tools/regression/sockets/listen_kqueue/
H A Dlisten_kqueue.c54 int kq, sock, opt, pid, nev, fd; local
56 if ((kq = kqueue()) == -1)
69 if (kevent(kq, ev, 2, NULL, 0, NULL) == -1)
87 if (kevent(kq, ev, 2, NULL, 0, NULL) == -1)
101 nev = kevent(kq, NULL, 0, ev, 2, NULL);
/freebsd-12-stable/bin/pwait/
H A Dpwait.c66 int kq; local
120 kq = kqueue();
121 if (kq == -1)
145 if (kevent(kq, e + nleft, 1, NULL, 0, NULL) == -1)
158 if (kevent(kq, e + nleft, 1, NULL, 0, NULL) == -1)
166 n = kevent(kq, NULL, 0, e, nleft + tflag, NULL);

Completed in 362 milliseconds

123