replace nob with ms' build, move disk creation to build.bat, major comment cleanup, remove old and stupid tests, overhaul interrupt management with per-CPU vector allocation, affinity migration and safe teardown, add proper IOAPIC routing and PCI MSI/MSI-X/INTx support, migrate drivers to the new interrupt API, integrate ACPICA with a proper OS services layer, move ACPI firmware events, power button handling and S5 shutdown into acpi.sys, add parallel driver startup and atomic publication, replace PnP arrays with dynamic lists, redesign service startup again to be asynchronous, add delayed startup mode for services, allow omitting keys in services.ini, fix acpi ec deferred work handling, fix kernel threads having garbage exit code.

This commit is contained in:
maksw committed 2026-10-28 15:18:43 +01:00
1 parent d36f19509c
commit 36eef8f58d
696 files changed
+147281 -7530

No files matched your search

@@ -38,7 +38,6 @@ typedef struct {
uint64_t SignalMask;
} PTHREAD_TRAMP;
// Implements the pthread Trampoline operation.
static void PthreadTrampoline(uintptr_t raw) {
PTHREAD_TRAMP* tr = (PTHREAD_TRAMP*)raw;
void* (*fn)(void*) = tr->Fn;
@@ -110,7 +109,6 @@ __declspec(dllexport) int pthread_create(pthread_t* t, const pthread_attr_t* att
return 0;
}
// Implements the pthread join operation.
__declspec(dllexport) int pthread_join(pthread_t t, void** retval) {
KSTATUS s = SysWait(t.Handle, SYS_WAIT_FLAG_NONE);
if (s != 0) return ESRCH;
@@ -122,7 +120,6 @@ __declspec(dllexport) int pthread_join(pthread_t t, void** retval) {
return 0;
}
// Implements the pthread exit operation.
__declspec(dllexport) void pthread_exit(void* retval) {
uint32_t tid = SysGetCurrentTid();
POSIX_PTHREAD_SLOT* slot = PthreadSlotFind(tid);
@@ -132,7 +129,6 @@ __declspec(dllexport) void pthread_exit(void* retval) {
while (1); // unreachable
}
// Implements the pthread mutex init operation.
__declspec(dllexport) int pthread_mutex_init(pthread_mutex_t* m, const pthread_mutexattr_t* attr) {
(void)attr;
uint32_t h;
@@ -142,26 +138,22 @@ __declspec(dllexport) int pthread_mutex_init(pthread_mutex_t* m, const pthread_m
return 0;
}
// Implements the pthread mutex destroy operation.
__declspec(dllexport) int pthread_mutex_destroy(pthread_mutex_t* m) {
SysCloseHandle(m->Handle);
m->Handle = 0;
return 0;
}
// Implements the pthread mutex lock operation.
__declspec(dllexport) int pthread_mutex_lock(pthread_mutex_t* m) {
KSTATUS s = SysWait(m->Handle, SYS_WAIT_FLAG_NONE);
return s == 0 ? 0 : EINVAL;
}
// Implements the pthread mutex trylock operation.
__declspec(dllexport) int pthread_mutex_trylock(pthread_mutex_t* m) {
KSTATUS s = SysTryAcquireMutex(m->Handle);
return s == 0 ? 0 : EAGAIN;
}
// Implements the pthread mutex unlock operation.
__declspec(dllexport) int pthread_mutex_unlock(pthread_mutex_t* m) {
KSTATUS s = SysReleaseMutex(m->Handle);
return s == 0 ? 0 : EINVAL;