Move mutex and mem create/cleanup functions into mutex.c and mem.c respectively
All checks were successful
Build documentation / build-and-deploy (push) Successful in 33s

This commit is contained in:
2026-01-16 22:13:17 +01:00
parent 9a7dbf0594
commit 4f7077d458
5 changed files with 37 additions and 32 deletions

View File

@@ -1,11 +1,24 @@
#include <libk/assert.h>
#include <libk/rbtree.h>
#include <libk/std.h>
#include <libk/string.h>
#include <proc/mutex.h>
#include <proc/proc.h>
#include <sync/spin_lock.h>
#include <sys/debug.h>
bool proc_create_resource_mutex (struct proc_mutex* mutex) {
memset (mutex, 0, sizeof (*mutex));
return true;
}
void proc_cleanup_resource_mutex (struct proc* proc, struct proc_resource* resource) {
struct proc_mutex* mutex = &resource->u.mutex;
proc_mutex_unlock (proc, mutex);
}
void proc_mutex_lock (struct proc* proc, struct proc_mutex* mutex) {
spin_lock_ctx_t ctxmt;