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
All checks were successful
Build documentation / build-and-deploy (push) Successful in 33s
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user