summaryrefslogtreecommitdiff
path: root/kernel/cpu
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-10-14 21:42:38 +0200
committerAnton Kling <anton@kling.gg>2024-10-14 21:42:38 +0200
commit87af93c7521be331a5794c6a53f31d13b3a24baa (patch)
tree7807e28e64b17bebd3a5ad4f980fbada3278e6df /kernel/cpu
parenta5b508d1fb751015ecb9b6701749dcdcd81e3071 (diff)
kernel: stuff
Diffstat (limited to 'kernel/cpu')
-rw-r--r--kernel/cpu/syscall.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c
index d31835d..aad0284 100644
--- a/kernel/cpu/syscall.c
+++ b/kernel/cpu/syscall.c
@@ -362,6 +362,13 @@ int syscall_shm_open(SYS_SHM_OPEN_PARAMS *args) {
return shm_open(args->name, args->oflag, args->mode);
}
+int syscall_shm_unlink(const char *name) {
+ if (!mmu_is_valid_user_c_string(name, NULL)) {
+ return -EPERM; // TODO: Is this correct?
+ }
+ return shm_unlink(name);
+}
+
int syscall_sigaction(int sig, const struct sigaction *restrict act,
struct sigaction *restrict oact) {
set_signal_handler(sig, act->sa_handler);
@@ -692,6 +699,7 @@ int (*syscall_functions[])() = {
(void(*))syscall_queue_mod_entries,
(void(*))syscall_queue_wait,
(void(*))syscall_sendfile,
+ (void(*))syscall_shm_unlink,
};
void int_syscall(reg_t *r);