Implement waiting for process, CE add command cancelation, rctx many cpus
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m27s

This commit is contained in:
2026-03-01 22:59:04 +01:00
parent 858e55118b
commit 9043c4f9ec
18 changed files with 308 additions and 89 deletions

View File

@@ -6,8 +6,24 @@
#include <sys/smp.h>
struct reschedule_ctx {
bool reschedule;
struct cpu* cpu;
struct cpu* cpus[CPUS_MAX];
};
#define rctx_insert_cpu(rctx, cpu) \
do { \
bool __found = false; \
for (size_t __i = 0; __i < CPUS_MAX; __i++) { \
if ((rctx)->cpus[__i] == (cpu)) \
__found = true; \
} \
if (!__found) { \
for (size_t __i = 0; __i < CPUS_MAX; __i++) { \
if ((rctx)->cpus[__i] == NULL) { \
(rctx)->cpus[__i] = (cpu); \
break; \
} \
} \
} \
} while (0)
#endif // _KERNEL_PROC_RESCHEDULE_H