Redesign reschedule points, allow one operation to reschedule many cpus at once
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m12s

This commit is contained in:
2026-02-18 23:16:03 +01:00
parent ae0a6024da
commit f103bdd739
39 changed files with 376 additions and 223 deletions

View File

@@ -17,9 +17,6 @@
#include <amd64/proc.h> /* USTACK_SIZE */
#endif
#define PROC_NEED_RESCHEDULE true
#define PROC_NO_RESCHEDULE false
/* process states */
#define PROC_READY 0
#define PROC_DEAD 1
@@ -29,6 +26,7 @@
#define PROC_USTK_PREALLOC (1 << 0)
struct cpu;
struct reschedule_ctx;
struct proc {
int pid;
@@ -50,11 +48,17 @@ struct proc {
};
void proc_sched (void);
bool proc_kill (struct proc* proc, struct cpu** reschedule_cpu);
void proc_kill (struct proc* proc, struct reschedule_ctx* rctx);
struct elf_aux proc_load_segments (struct proc* proc, uint8_t* elf);
bool proc_register (struct proc* proc, struct cpu** reschedule_cpu);
void proc_register (struct proc* proc, struct cpu* register_cpu, struct reschedule_ctx* rctx);
struct proc* proc_find_pid (int pid);
struct proc* proc_from_file (struct procgroup* procgroup, const char* mountpoint, const char* path);
void proc_init (void);
#endif // _KERNEL_PROC_PROC_H