/freebsd-current/usr.bin/diff/ |
H A D | pr.h | 31 int kq; member in struct:pr
|
H A D | pr.c | 85 pr->kq = kqueue(); 86 if (pr->kq == -1) 91 if (kevent(pr->kq, pr->e, 1, NULL, 0, NULL) == -1) 112 if (kevent(pr->kq, NULL, 0, pr->e, 1, NULL) == -1) 115 close(pr->kq);
|
/freebsd-current/sys/kern/ |
H A D | kern_event.c | 82 * This lock is used if multiple kq locks are required. This possibly 102 static int kqueue_register(struct kqueue *kq, struct kevent *kev, 105 static void kqueue_release(struct kqueue *kq, int locked); 106 static void kqueue_destroy(struct kqueue *kq); 107 static void kqueue_drain(struct kqueue *kq, struct thread *td); 108 static int kqueue_expand(struct kqueue *kq, const struct filterops *fops, 111 static int kqueue_scan(struct kqueue *kq, int maxevents, 115 static void kqueue_wakeup(struct kqueue *kq); 146 static int knote_attach(struct knote *kn, struct kqueue *kq); 224 #define KQ_LOCK(kq) d 379 struct kqueue *kq = kn->kn_fp->f_data; local 394 struct kqueue *kq = kn->kn_fp->f_data; local 403 struct kqueue *kq = kn->kn_fp->f_data; local 530 struct kqueue *kq; local 893 struct kqueue *kq; local 1072 kqueue_init(struct kqueue *kq) argument 1085 struct kqueue *kq; local 1323 kqueue_kevent(struct kqueue *kq, struct thread *td, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout) argument 1370 struct kqueue *kq; local 1389 struct kqueue kq = {}; local 1489 kqueue_register(struct kqueue *kq, struct kevent *kev, struct thread *td, int mflag) argument 1762 struct kqueue *kq; local 1782 kqueue_release(struct kqueue *kq, int locked) argument 1802 kqueue_schedtask(struct kqueue *kq) argument 1821 kqueue_expand(struct kqueue *kq, const struct filterops *fops, uintptr_t ident, int mflag) argument 1891 struct kqueue *kq; local 1915 kqueue_scan(struct kqueue *kq, int maxevents, struct kevent_copyops *k_ops, const struct timespec *tsp, struct kevent *keva, struct thread *td) argument 2170 struct kqueue *kq; local 2210 kqueue_drain(struct kqueue *kq, struct thread *td) argument 2273 kqueue_destroy(struct kqueue *kq) argument 2294 struct kqueue *kq = fp->f_data; local 2332 struct kqueue *kq = fp->f_data; local 2342 kqueue_wakeup(struct kqueue *kq) argument 2373 struct kqueue *kq; local 2592 struct kqueue *kq; local 2653 struct kqueue *kq; local 2689 knote_attach(struct knote *kn, struct kqueue *kq) argument 2723 struct kqueue *kq; local 2759 struct kqueue *kq = kn->kn_kq; local 2773 struct kqueue *kq = kn->kn_kq; local 2813 struct kqueue *kq; local [all...] |
/freebsd-current/contrib/netbsd-tests/kernel/kqueue/ |
H A D | t_ioctl.c | 56 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 D | t_proc3.c | 60 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 D | t_proc2.c | 93 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));
|
/freebsd-current/lib/libc/sys/ |
H A D | kevent.c | 41 kevent(int kq, const struct kevent *changelist, int nchanges, argument 44 return (INTERPOS_SYS(kevent, kq, changelist, nchanges, eventlist,
|
/freebsd-current/tools/test/stress2/misc/ |
H A D | kevent3.sh | 64 int kq; 66 kq = kqueue(); 69 kevent(kq, &ke, 1, NULL, 0, NULL); 71 kevent(kq, NULL, 0, &ke, 1, NULL);
|
H A D | kevent14.sh | 48 int kq, ret; 50 kq = kqueue(); 51 if (kq < 0) 59 ret = kevent(kq, &ev[0], 1, &ev[1], 1, NULL);
|
H A D | pmc4.sh | 62 static int kq; 72 if ((rfd = pmclog_open(kq)) == NULL) 73 err(1, "pmclog_open(%d)", kq); 74 if (pmc_configure_logfile(kq) < 0) 97 if ((kq = kqueue()) < 0) 105 if (kevent(kq, ev, n, NULL, 0, NULL) < 0) 111 if (kevent(kq, ev, n, NULL, 0, NULL) < 0)
|
H A D | kevent16.sh | 50 int kq = kqueue(); 51 assert(kq >= 0); 54 rv = kevent(kq, &kev, 1, NULL, 0, NULL); 63 rv = kevent(kq, NULL, 0, &kev, 1, NULL); 65 rv = kevent(kq, NULL, 0, &kev, 1, &(struct timespec) { 0, 0 }); 68 rv = kevent(kq, NULL, 0, &kev, 1, &(struct timespec) { 0, 0 });
|
/freebsd-current/tests/sys/fifo/ |
H A D | fifo_kqueue.c | 55 int kq = kqueue(); local 56 ATF_REQUIRE(kq >= 0); 62 ATF_REQUIRE(kevent(kq, kev, 2, NULL, 0, NULL) == 0); 66 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 84 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 93 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 100 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 116 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 132 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), NULL) == 1); 140 ATF_REQUIRE(close(kq) 156 int kq = kqueue(); local 225 int kq, p[2]; local 289 int kq = kqueue(); local 342 int kq = kqueue(); local [all...] |
/freebsd-current/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_kevent.c | 66 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-current/contrib/netbsd-tests/kernel/kqueue/write/ |
H A D | t_pipe.c | 60 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 D | t_fifo.c | 63 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));
|
/freebsd-current/tests/sys/kqueue/ |
H A D | kqueue_fork.c | 58 int kq; local 60 kq = kqueue(); 61 if (kq < 0) 65 if (kevent(kq, &ev, 1, NULL, 0, NULL) < 0) 67 if (kevent(kq, NULL, 0, &ev, 1, NULL) < 0)
|
H A D | kqueue_peek_signal.c | 60 int kq = kqueue(); local 61 ATF_REQUIRE(kq >= 0); 64 rv = kevent(kq, &kev, 1, NULL, 0, NULL); 80 rv = kevent(kq, NULL, 0, &kev, 1, &(struct timespec) { 0, 0 }); 84 rv = kevent(kq, NULL, 0, &kev, 1, &(struct timespec) { 0, 0 });
|
/freebsd-current/tools/regression/sockets/kqueue/ |
H A D | kqueue.c | 102 test_evfilt_read(int kq, int fd[2], const char *socktype) argument 111 if (kevent(kq, &ke, 1, NULL, 0, NULL) == -1) 120 i = kevent(kq, NULL, 0, &ke, 1, &ts); 146 i = kevent(kq, NULL, 0, &ke, 1, &ts); 171 i = kevent(kq, NULL, 0, &ke, 1, &ts); 181 if (kevent(kq, &ke, 1, NULL, 0, NULL) == -1) 187 test_evfilt_write(int kq, int fd[2], const char *socktype) argument 196 if (kevent(kq, &ke, 1, NULL, 0, NULL) == -1) 205 i = kevent(kq, NULL, 0, &ke, 1, &ts); 231 i = kevent(kq, NUL 253 int kq, sv[2]; local [all...] |
/freebsd-current/contrib/netbsd-tests/kernel/kqueue/read/ |
H A D | t_file2.c | 56 int fd1, fd2, kq; local 66 RL(kq = kqueue()); 69 RL(kevent(kq, event, 1, NULL, 0, NULL));
|
H A D | t_pipe.c | 56 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));
|
H A D | t_fifo.c | 60 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));
|
/freebsd-current/contrib/openbsm/bin/auditdistd/ |
H A D | subr.c | 190 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-current/tests/sys/kern/pipe/ |
H A D | pipe_kqueue_test.c | 52 int kq = kqueue(); local 53 ATF_REQUIRE(kq >= 0); 58 ATF_REQUIRE(kevent(kq, kev, 1, NULL, 0, NULL) == 0); 62 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 80 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 89 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 96 r = kevent(kq, NULL, 0, kev, nitems(kev), &(struct timespec) { 0, 0 }); 112 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 128 ATF_REQUIRE(kevent(kq, NULL, 0, kev, nitems(kev), 137 ATF_REQUIRE(close(kq) 152 int kq = kqueue(); local 194 int kq = kqueue(); local 245 int kq, p[2]; local 298 int kq, p[2]; local [all...] |
/freebsd-current/tests/sys/mqueue/ |
H A D | mqtest4.c | 33 int kq, status; local 55 kq = kqueue(); 60 status = kevent(kq, &kev, 1, NULL, 0, NULL); 66 status = kevent(kq, NULL, 0, &kev, 1, NULL); 90 kq = kqueue(); 92 status = kevent(kq, &kev, 1, NULL, 0, NULL); 101 status = kevent(kq, NULL, 0, &kev, 1, NULL);
|
/freebsd-current/tools/regression/sockets/listen_kqueue/ |
H A D | listen_kqueue.c | 52 int kq, sock, opt, pid, nev, fd; local 54 if ((kq = kqueue()) == -1) 67 if (kevent(kq, ev, 2, NULL, 0, NULL) == -1) 85 if (kevent(kq, ev, 2, NULL, 0, NULL) == -1) 99 nev = kevent(kq, NULL, 0, ev, 2, NULL);
|