implement user mode catchable exceptions, refactor system status codes to use NTLSTATUS_ prefix, update build scripts to use shared literal macros for linker arguments, update named queue lifetime cleanup to include KeNamedQueueUnpublishHandle.
This commit is contained in:
1 parent
1f5477cf66
commit
b7fcfce6f7
140 files changed
+7649
-3943
No files matched your search
@@ -36,9 +36,9 @@ static void HalOutputReleaseRegistrationLock(void) {
|
||||
static KSTATUS HalOutputRegisterEndpoint(const HAL_OUTPUT_ENDPOINT* endpoint, uint32_t* endpointIdOut) {
|
||||
if (!endpoint || !endpointIdOut || !endpoint->Name || !endpoint->Write ||
|
||||
endpoint->StreamMask == 0 || (endpoint->StreamMask & ~HAL_OUTPUT_STREAM_ALL) != 0)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
KSTATUS status = STATUS_NO_MEMORY;
|
||||
KSTATUS status = NTLSTATUS_NO_MEMORY;
|
||||
HalOutputAcquireRegistrationLock();
|
||||
for (uint32_t i = 0; i < HAL_OUTPUT_ENDPOINT_CAPACITY; i++) {
|
||||
HAL_OUTPUT_SLOT* slot = &gOutputSlots[i];
|
||||
@@ -50,7 +50,7 @@ static KSTATUS HalOutputRegisterEndpoint(const HAL_OUTPUT_ENDPOINT* endpoint, ui
|
||||
_InterlockedExchange(&slot->Published, 1);
|
||||
_InterlockedIncrement(&gOutputEndpointCount);
|
||||
*endpointIdOut = i;
|
||||
status = STATUS_SUCCESS;
|
||||
status = NTLSTATUS_SUCCESS;
|
||||
break;
|
||||
}
|
||||
HalOutputReleaseRegistrationLock();
|
||||
@@ -61,14 +61,14 @@ static KSTATUS HalOutputRegisterEndpoint(const HAL_OUTPUT_ENDPOINT* endpoint, ui
|
||||
static KSTATUS HalOutputSetEndpointStreams(uint32_t endpointId, uint32_t streamMask) {
|
||||
if (endpointId >= HAL_OUTPUT_ENDPOINT_CAPACITY ||
|
||||
(streamMask & ~HAL_OUTPUT_STREAM_ALL) != 0)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
HAL_OUTPUT_SLOT* slot = &gOutputSlots[endpointId];
|
||||
if (_InterlockedCompareExchange(&slot->Published, 0, 0) == 0)
|
||||
return STATUS_NOT_FOUND;
|
||||
return NTLSTATUS_NOT_FOUND;
|
||||
|
||||
_InterlockedExchange((volatile long*)&slot->Endpoint.StreamMask, (long)streamMask);
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Fans one text record out to every subscribed endpoint.
|
||||
|
||||
Reference in new issue
Block a user