All checks were successful
Build documentation / build-and-deploy (push) Successful in 33s
24 lines
602 B
C
24 lines
602 B
C
#ifndef _KERNEL_PROC_MUTEX_H
|
|
#define _KERNEL_PROC_MUTEX_H
|
|
|
|
#include <libk/std.h>
|
|
#include <proc/suspension_q.h>
|
|
|
|
struct proc;
|
|
struct proc_resource;
|
|
|
|
struct proc_mutex {
|
|
struct proc_resource* resource;
|
|
|
|
bool locked;
|
|
struct proc_suspension_q suspension_q;
|
|
struct proc* owner;
|
|
};
|
|
|
|
bool proc_create_resource_mutex (struct proc_mutex* mutex);
|
|
void proc_cleanup_resource_mutex (struct proc* proc, struct proc_resource* resource);
|
|
void proc_mutex_lock (struct proc* proc, struct proc_mutex* mutex);
|
|
bool proc_mutex_unlock (struct proc* proc, struct proc_mutex* mutex);
|
|
|
|
#endif // _KERNEL_PROC_MUTEX_H
|