Home
last modified time | relevance | path

Searched refs:kq (Results 1 – 25 of 36) sorted by relevance

12

/openbsd/src/sys/dev/pci/drm/amd/amdkfd/
Dkfd_kernel_queue.c42 static bool kq_initialize(struct kernel_queue *kq, struct kfd_node *dev, in kq_initialize() argument
62 kq->dev = dev; in kq_initialize()
63 kq->nop_packet = nop.u32all; in kq_initialize()
66 kq->mqd_mgr = dev->dqm->mqd_mgrs[KFD_MQD_TYPE_DIQ]; in kq_initialize()
69 kq->mqd_mgr = dev->dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ]; in kq_initialize()
76 if (!kq->mqd_mgr) in kq_initialize()
86 retval = kfd_gtt_sa_allocate(dev, queue_size, &kq->pq); in kq_initialize()
93 kq->pq_kernel_addr = kq->pq->cpu_ptr; in kq_initialize()
94 kq->pq_gpu_addr = kq->pq->gpu_addr; in kq_initialize()
98 retval = kfd_gtt_sa_allocate(dev, PAGE_SIZE, &kq->eop_mem); in kq_initialize()
[all …]
Dkfd_process_queue_manager.c40 (pqn->kq && pqn->kq->queue->properties.queue_id == qid)) in get_queue_by_qid()
319 struct kernel_queue *kq; in pqm_create_queue() local
332 kq = NULL; in pqm_create_queue()
385 pqn->kq = NULL; in pqm_create_queue()
406 pqn->kq = NULL; in pqm_create_queue()
412 kq = kernel_queue_init(dev, KFD_QUEUE_TYPE_DIQ); in pqm_create_queue()
413 if (!kq) { in pqm_create_queue()
417 kq->queue->properties.queue_id = *qid; in pqm_create_queue()
418 pqn->kq = kq; in pqm_create_queue()
425 kq, &pdd->qpd); in pqm_create_queue()
[all …]
Dkfd_kernel_queue.h47 int kq_acquire_packet_buffer(struct kernel_queue *kq,
50 int kq_submit_packet(struct kernel_queue *kq);
51 void kq_rollback_packet(struct kernel_queue *kq);
Dkfd_packet_manager.c136 struct kernel_queue *kq; in pm_create_runlist_ib() local
170 list_for_each_entry(kq, &qpd->priv_queue_list, list) { in pm_create_runlist_ib()
171 if (!kq->queue->properties.is_active) in pm_create_runlist_ib()
176 kq->queue->queue, qpd->is_debug); in pm_create_runlist_ib()
180 kq->queue, in pm_create_runlist_ib()
/openbsd/src/regress/sys/kern/kqueue/
DMakefile11 kq-exec: ${PROG}
13 kq-pipe: ${PROG}
15 kq-fork: ${PROG}
17 kq-process: ${PROG}
19 kq-random: ${PROG}
21 kq-tun: ${PROG}
27 kq-pty-1: ${PROG}
29 kq-pty-2: ${PROG}
31 kq-signal: ${PROG}
33 kq-fdpass: ${PROG}
[all …]
Dkqueue-regress.c62 int kq; in do_regress1() local
64 ASS((kq = kqueue()) >= 0, in do_regress1()
67 EV_SET(&kev[0], kq, EVFILT_READ, EV_ADD, 0, 0, NULL); in do_regress1()
69 ASS(kevent(kq, kev, 2, NULL, 0, NULL) == 0, in do_regress1()
95 int kq; in do_regress2() local
102 kq = kqueue(); in do_regress2()
103 if (kq == -1) in do_regress2()
107 if (kevent(kq, kev, 1, NULL, 0, NULL) == -1) in do_regress2()
111 if (kevent(kq, kev, 1, NULL, 0, NULL) == -1) in do_regress2()
115 if (kevent(kq, kev, 1, NULL, 0, NULL) == -1) in do_regress2()
[all …]
Dkqueue-timer.c41 int i, kq, n; in do_timer() local
43 ASS((kq = kqueue()) >= 0, in do_timer()
51 n = kevent(kq, &ev, 1, NULL, 0, NULL); in do_timer()
57 n = kevent(kq, NULL, 0, &ev, 1, &ts); in do_timer()
67 n = kevent(kq, &ev, 1, NULL, 0, NULL); in do_timer()
73 n = kevent(kq, NULL, 0, &ev, 1, &ts); in do_timer()
85 n = kevent(kq, &ev, 1, NULL, 0, NULL); in do_timer()
91 n = kevent(kq, NULL, 0, &ev, 1, &ts); in do_timer()
100 n = kevent(kq, &ev, 1, NULL, 0, NULL); in do_timer()
131 n = kevent(kq, &ev, 1, NULL, 0, NULL); in do_timer()
[all …]
Dkqueue-pty.c20 pty_check(int kq, struct kevent *ev, int n, int rm, int rs, int wm, int ws) in pty_check() argument
27 if ((n = kevent(kq, NULL, 0, ev, n, &ts)) < 0) in pty_check()
63 int fd, kq, massa, slave; in pty_rdrw() local
78 if ((kq = kqueue()) == -1) in pty_rdrw()
86 if (kevent(kq, ev, 4, NULL, 0, NULL) < 0) in pty_rdrw()
91 ASSX(pty_check(kq, ev, 4, -massa, -slave, massa, slave) == 0); in pty_rdrw()
96 ASSX(pty_check(kq, ev, 4, -massa, slave, massa, slave) == 0); in pty_rdrw()
100 ASSX(pty_check(kq, ev, 4, -massa, -slave, massa, slave) == 0); in pty_rdrw()
105 ASSX(pty_check(kq, ev, 4, -massa, slave, -massa, slave) == 0); in pty_rdrw()
109 ASSX(pty_check(kq, ev, 4, -massa, slave, massa, slave) == 0); in pty_rdrw()
[all …]
Dkqueue-signal.c24 int kq; variable
35 ASS(kevent(kq, NULL, 0, &ke, 1, &ts) == 1, in sigtest()
57 ASS((kq = kqueue()) >= 0, warn("kqueue")); in do_signal()
63 ASS(kevent(kq, &ke, 1, NULL, 0, NULL) == 0, in do_signal()
66 ASS(kevent(kq, &ke, 1, NULL, 0, NULL) == 0, in do_signal()
70 ASS(kevent(kq, &ke, 1, NULL, 0, NULL) != 0, in do_signal()
94 close(kq); in do_signal()
Dkqueue-random.c22 int n, fd, kq; in do_random() local
32 ASS((kq = kqueue()) >= 0, in do_random()
39 n = kevent(kq, &ev, 1, NULL, 0, NULL); in do_random()
44 n = kevent(kq, NULL, 0, &ev, 1, &ts); in do_random()
50 close(kq); in do_random()
Dkqueue-process.c29 int kq, status; in do_process() local
41 ASS((kq = kqueue()) >= 0, in do_process()
59 ASS(kevent(kq, &ke, 1, NULL, 0, NULL) == 0, in do_process()
65 ASS(kevent(kq, &ke, 1, NULL, 0, NULL) != 0, in do_process()
77 ASS(kevent(kq, NULL, 0, &ke, 1, &ts) == 1, in do_process()
121 ASS(kevent(kq, NULL, 0, &ke, 1, &ts) == 1, in do_process()
142 close(kq); in do_process()
Dkqueue-pipe.c47 int kq; in do_pipe() local
59 ASS((kq = kqueue()) >= 0, in do_pipe()
66 n = kevent(kq, &ev, 1, NULL, 0, NULL); in do_pipe()
75 n = kevent(kq, NULL, 0, &ev, 1, &ts); in do_pipe()
82 n = kevent(kq, NULL, 0, &ev, 1, &ts); in do_pipe()
Dkqueue-fork.c20 int kq, status; in check_inheritance() local
22 ASS((kq = kqueue()) >= 0, in check_inheritance()
33 if (close(kq) < 0) in check_inheritance()
44 close(kq); in check_inheritance()
Dkqueue-flock.c60 int fd, kq; in do_flock() local
74 kq = kqueue(); in do_flock()
76 if (kevent(kq, &kev, 1, NULL, 0, NULL)) in do_flock()
82 if (kevent(kq, &kev, 1, NULL, 0, NULL)) in do_flock()
87 close(kq); in do_flock()
Dkqueue-exec.c54 int kq, status; in do_exec_parent() local
65 kq = kqueue1(cloexec ? O_CLOEXEC : 0); in do_exec_parent()
66 if (kq == -1) in do_exec_parent()
68 snprintf(fdbuf, sizeof(fdbuf), "%d", kq); in do_exec_parent()
/openbsd/src/sys/kern/
Dkern_event.c79 void kqueue_wakeup(struct kqueue *kq);
82 void kqueue_do_check(struct kqueue *kq, const char *func, int line);
83 #define kqueue_check(kq) kqueue_do_check((kq), __func__, __LINE__) argument
85 #define kqueue_check(kq) do {} while (0) argument
93 static void kqueue_expand_hash(struct kqueue *kq);
94 static void kqueue_expand_list(struct kqueue *kq, int fd);
116 void knote_remove(struct proc *p, struct kqueue *kq, struct knlist **plist,
123 int filt_kqueue_common(struct knote *kn, struct kqueue *kq);
208 KQREF(struct kqueue *kq) in KQREF() argument
210 refcnt_take(&kq->kq_refcnt); in KQREF()
[all …]
Dkern_kthread.c116 struct kthread_q *kq; in kthread_create_deferred() local
123 kq = malloc(sizeof *kq, M_TEMP, M_NOWAIT|M_ZERO); in kthread_create_deferred()
124 if (kq == NULL) in kthread_create_deferred()
127 kq->kq_func = func; in kthread_create_deferred()
128 kq->kq_arg = arg; in kthread_create_deferred()
130 SIMPLEQ_INSERT_TAIL(&kthread_q, kq, kq_q); in kthread_create_deferred()
136 struct kthread_q *kq; in kthread_run_deferred_queue() local
141 while ((kq = SIMPLEQ_FIRST(&kthread_q)) != NULL) { in kthread_run_deferred_queue()
143 (*kq->kq_func)(kq->kq_arg); in kthread_run_deferred_queue()
144 free(kq, M_TEMP, sizeof(*kq)); in kthread_run_deferred_queue()
/openbsd/src/regress/lib/libc/sys/
Dt_kevent.c63 int kq; in ATF_TC_BODY() local
65 ATF_REQUIRE((kq = kqueue()) != -1); in ATF_TC_BODY()
67 ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, NULL) != -1); in ATF_TC_BODY()
68 ATF_REQUIRE(kevent(kq, NULL, 0, &ev, 1, NULL) == 1); in ATF_TC_BODY()
81 int s[2], storage, status, kq; in ATF_TC_BODY() local
87 ATF_REQUIRE((kq = kqueue()) != -1); in ATF_TC_BODY()
116 kq = *(int *)CMSG_DATA(msg); in ATF_TC_BODY()
117 printf("child (pid %d): received kq fd %d\n", getpid(), kq); in ATF_TC_BODY()
130 *(int *)CMSG_DATA(msg) = kq; in ATF_TC_BODY()
133 ATF_CHECK(kevent(kq, &ev, 1, NULL, 0, NULL) != -1); in ATF_TC_BODY()
[all …]
/openbsd/src/regress/sys/kern/descrip/
Ddescrip.c31 int fd, kq, status; in main() local
34 kq = kqueue(); in main()
35 assert(kq == 3); in main()
46 kq = kqueue(); in main()
47 assert(kq == 3); in main()
/openbsd/src/lib/libevent/
Dkqueue.c60 int kq; member
84 int i, kq; in kq_init() local
96 if ((kq = kqueue()) == -1) { in kq_init()
102 kqueueop->kq = kq; in kq_init()
198 res = kevent(kqop->kq, kqop->nchanges ? changes : NULL, kqop->nchanges, in kq_dispatch()
309 if (kevent(kqop->kq, &kev, 1, NULL, 0, &timeout) == -1) in kq_add()
383 if (kevent(kqop->kq, &kev, 1, NULL, 0, &timeout) == -1) in kq_del()
446 if (kqop->kq >= 0 && kqop->pid == getpid()) in kq_dealloc()
447 close(kqop->kq); in kq_dealloc()
/openbsd/src/regress/lib/libpthread/restart/kevent/
Dkevent.c26 int kq; in thr_kevent() local
28 CHECKe(kq = kqueue()); in thr_kevent()
29 ASSERT(kevent(kq, NULL, 0, &ev, 1, &ts) == -1); in thr_kevent()
/openbsd/src/usr.bin/tail/
Dforward.c54 static int kq = -1; variable
91 if (fflag && (kq = kqueue()) == -1) in forward()
187 if (!fflag || kq == -1) in forward()
191 if ((nevents = kevent(kq, NULL, 0, &ke, 1, ts)) <= 0) { in forward()
193 close(kq); in forward()
305 if (kq < 0) { in tfqueue()
320 if (kevent(kq, ke, i, NULL, 0, NULL) == -1) { in tfqueue()
/openbsd/src/usr.sbin/apmd/
Dapmd.c422 int kq, nchanges; in main() local
527 kq = kqueue(); in main()
528 if (kq <= 0) in main()
540 if (kevent(kq, ev, nchanges, NULL, 0, &sts) == -1) in main()
548 if ((rv = kevent(kq, NULL, 0, ev, 1, &sts)) == -1) in main()
/openbsd/src/games/adventure/
Dsave.c75 {&kq, sizeof(kq)},
/openbsd/src/sys/sys/
Devent.h302 extern int kqueue_register(struct kqueue *kq, struct kevent *kev,
373 int kevent(int kq, const struct kevent *changelist, int nchanges,

12