All checks were successful
Build documentation / build-and-deploy (push) Successful in 28s
29 lines
766 B
C
29 lines
766 B
C
#ifndef _KERNEL_PROC_SUSPENTION_Q_H
|
|
#define _KERNEL_PROC_SUSPENTION_Q_H
|
|
|
|
#include <libk/list.h>
|
|
#include <sync/spin_lock.h>
|
|
|
|
struct proc;
|
|
struct cpu;
|
|
|
|
struct proc_suspension_q {
|
|
struct list_node_link* proc_list;
|
|
spin_lock_t lock;
|
|
};
|
|
|
|
struct proc_sq_entry {
|
|
struct list_node_link sq_link;
|
|
struct list_node_link proc_link;
|
|
struct proc* proc;
|
|
struct proc_suspension_q* sq;
|
|
};
|
|
|
|
void proc_sqs_cleanup (struct proc* proc);
|
|
bool proc_sq_suspend (struct proc* proc, struct proc_suspension_q* sq, spin_lock_t* resource_lock,
|
|
spin_lock_ctx_t* ctxrl, struct cpu** reschedule_cpu);
|
|
bool proc_sq_resume (struct proc* proc, struct proc_sq_entry* sq_entry,
|
|
struct cpu** reschedule_cpu);
|
|
|
|
#endif // _KERNEL_PROC_SUSPENTION_Q_H
|