colonel.exe 🤑, refactor all include directives, AHCI is now interrupt driven, upgrades to IDE, implemented I/O Request Packets, fix numerous keyboard issues, change all for (;;) and while (1) to while (true), DbgPrint guarded by spinlock, fix KeSignalEvent, major KernelMain refactor, added SystemInitThread because of new blocking I/O, replace memcpy manouvers with strncpy and strncat, add: run for ide, runa for ahci, rund for debug and ide, runad for debug and ahci.

This commit is contained in:
maksw committed 2026-05-03 19:35:48 +02:00
1 parent 7f4052f41c
commit 9fa2a7e0db
61 files changed
+1311 -456

No files matched your search

+7 -6
View File
@@ -1,8 +1,9 @@
// ke_event.c - synchronisation events
#include "ke_event.h"
#include "ke_thread.h"
#include "ke_sched.h"
#include "ob_object.h"
#include <stdbool.h>
#include <ke_event.h>
#include <ke_thread.h>
#include <ke_sched.h>
#include <ob_object.h>
static void EventDestroy(OBJECT* obj) { (void)obj; }
@@ -33,6 +34,7 @@ void KeSignalEvent(EVENT* event) {
flags = KeAcquireSpinlock(&event->Lock);
}
} else {
event->Signaled = 1;
if (!LIST_IS_EMPTY(&event->WaitList)) {
LIST_ENTRY* node = ListPopHead(&event->WaitList);
THREAD* t = CONTAINING_RECORD(node, THREAD, SchedulerLink);
@@ -40,7 +42,6 @@ void KeSignalEvent(EVENT* event) {
KeUnblockThread(t);
return;
}
event->Signaled = 1;
}
KeReleaseSpinlock(&event->Lock, flags);
}
@@ -56,7 +57,7 @@ KSTATUS KeWaitForEvent(EVENT* event) {
if (!event) return STATUS_INVALID_PARAMETER;
THREAD* self = KeCurrentThread();
for (;;) {
while (true) {
uintptr_t flags = KeAcquireSpinlock(&event->Lock);
if (event->Signaled) {
if (event->Type == EventAutoReset) event->Signaled = 0;