aboutsummaryrefslogtreecommitdiff
path: root/src/uapi/irq.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-02 21:40:10 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-02 21:40:10 +0300
commit8a3452098267e1af127d6c4f1836a9d82cd23f38 (patch)
treec9fad842a8903f64a57027b66ef54bba0dee2928 /src/uapi/irq.c
parent7ad9c01dad7b1b46eced8290b8b991383d648188 (diff)
downloadkmi-8a3452098267e1af127d6c4f1836a9d82cd23f38.tar.gz
kmi-8a3452098267e1af127d6c4f1836a9d82cd23f38.zip
more complete interrupt handling outline
+ Still largely untested, should really try to come up with a proper testsuite, at the moment it's mostly me trying things out in the (as of yet unreleased) kmx repo
Diffstat (limited to 'src/uapi/irq.c')
-rw-r--r--src/uapi/irq.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/uapi/irq.c b/src/uapi/irq.c
index 9bd8ec1..29da614 100644
--- a/src/uapi/irq.c
+++ b/src/uapi/irq.c
@@ -13,6 +13,7 @@
* Actual IRQ handling request syscall handler.
*
* @param t Current tcb.
+ * @param id Which IRQ number to register.
*
* @return OK on success, non-zero otherwise.
*/
@@ -27,9 +28,18 @@ SYSCALL_DEFINE1(irq_req)(struct tcb *t, sys_arg_t id)
return_args1(t, register_irq(t, id));
}
+/**
+ * Actual notification handler setter.
+ *
+ * @param t Current tcb.
+ * @param tid Thread whose handler to set.
+ * @param pid Process that is willing to handle notifications for the thread.
+ *
+ * @return OK on success, non-zero otherwise.
+ */
SYSCALL_DEFINE2(req_notification)(struct tcb *t, sys_arg_t tid, sys_arg_t pid)
{
- if (!has_cap(t->caps, CAP_NOTIFICATION))
+ if (!has_cap(t->caps, CAP_SIGNAL))
return_args1(t, ERR_PERM);
struct tcb *r = get_tcb(tid);