clean up and standardize types across the codebase, unify atomic operations, improve UTF-8 handling throughout the system, remove obsolete input and named queue interfaces, redesign process preparation and creation, tighten IPC and service boundaries, improve error handling and reliability, minor documentation cleanup, fix doom surfaces, fix panic in ini parsing.
This commit is contained in:
1 parent
899225f551
commit
c0ad63c27f
226 files changed
+6562
-4147
No files matched your search
@@ -36,8 +36,8 @@ static void KiMutexReferenceOwnerLocked(MUTEX* mutex, THREAD* owner) {
|
||||
}
|
||||
|
||||
// Tests whether one scheduler link is currently attached to a list.
|
||||
static int KiMutexWaiterIsLinked(const THREAD* thread) {
|
||||
if (!thread) return 0;
|
||||
static bool KiMutexWaiterIsLinked(const THREAD* thread) {
|
||||
if (!thread) return false;
|
||||
return thread->SchedulerLink.Fwd != &thread->SchedulerLink ||
|
||||
thread->SchedulerLink.Bwd != &thread->SchedulerLink;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ static void KiMutexPropagatePriority(THREAD* thread) {
|
||||
|
||||
for (uint32_t depth = 1; thread && depth <= KE_PRIORITY_INHERITANCE_MAX_DEPTH; depth++) {
|
||||
MUTEX* waitingMutex = (MUTEX*)0;
|
||||
int changed = KiSchedulerRefreshEffectivePriority(thread, &waitingMutex);
|
||||
bool changed = KiSchedulerRefreshEffectivePriority(thread, &waitingMutex);
|
||||
if (!changed) {
|
||||
if (releaseThread) ObDereferenceObject(&thread->Header);
|
||||
return;
|
||||
@@ -223,8 +223,8 @@ __declspec(dllexport) void KeReleaseMutex(MUTEX* mutex) {
|
||||
}
|
||||
|
||||
// Removes one blocked mutex waiter during thread-wait rundown.
|
||||
int KiMutexAbortWait(MUTEX* mutex, THREAD* thread) {
|
||||
if (!mutex || !thread) return 0;
|
||||
bool KiMutexAbortWait(MUTEX* mutex, THREAD* thread) {
|
||||
if (!mutex || !thread) return false;
|
||||
|
||||
uintptr_t flags = KeAcquireSpinlock(&mutex->Lock);
|
||||
if (thread->WaitingMutex != mutex ||
|
||||
@@ -232,7 +232,7 @@ int KiMutexAbortWait(MUTEX* mutex, THREAD* thread) {
|
||||
thread->WaitListHead != &mutex->WaitList ||
|
||||
!KiMutexWaiterIsLinked(thread)) {
|
||||
KeReleaseSpinlock(&mutex->Lock, flags);
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
KeListRemoveChecked(&thread->SchedulerLink);
|
||||
@@ -245,7 +245,7 @@ int KiMutexAbortWait(MUTEX* mutex, THREAD* thread) {
|
||||
KiMutexPropagatePriority(owner);
|
||||
if (owner) ObDereferenceObject(&owner->Header);
|
||||
KiMutexPropagatePriority(thread);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Abandons one mutex owned by a terminating thread.
|
||||
|
||||
Reference in new issue
Block a user