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
@@ -77,12 +77,12 @@ static uint32_t open_first_large(uint32_t* fileOut, const char** pathOut, uint64
|
||||
SYS_FILE_FLAG_NONE,
|
||||
&h);
|
||||
uint32_t s = SysOpenFile(&req);
|
||||
if (s != STATUS_SUCCESS)
|
||||
if (s != NTLSTATUS_SUCCESS)
|
||||
continue;
|
||||
|
||||
uint64_t size = 0;
|
||||
s = SysGetFileSize(h, &size);
|
||||
if (s != STATUS_SUCCESS) {
|
||||
if (s != NTLSTATUS_SUCCESS) {
|
||||
SysCloseHandle(h);
|
||||
continue;
|
||||
}
|
||||
@@ -90,13 +90,13 @@ static uint32_t open_first_large(uint32_t* fileOut, const char** pathOut, uint64
|
||||
*fileOut = h;
|
||||
*pathOut = candidates[i];
|
||||
*sizeOut = size;
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SysCloseHandle(h);
|
||||
}
|
||||
|
||||
return STATUS_NOT_FOUND;
|
||||
return NTLSTATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
@@ -104,14 +104,14 @@ int main(void) {
|
||||
|
||||
SYS_FILE_CACHE_STATS before;
|
||||
SYS_FILE_CACHE_STATS after;
|
||||
if (query_cache(&before) != STATUS_SUCCESS)
|
||||
if (query_cache(&before) != NTLSTATUS_SUCCESS)
|
||||
fail("initial cache stats query failed");
|
||||
|
||||
uint32_t file = 0;
|
||||
const char* path = 0;
|
||||
uint64_t size = 0;
|
||||
uint32_t s = open_first_large(&file, &path, &size);
|
||||
if (s != STATUS_SUCCESS)
|
||||
if (s != NTLSTATUS_SUCCESS)
|
||||
fail_status("open large asset", s);
|
||||
|
||||
print("pcache_pressure: using ");
|
||||
@@ -126,7 +126,7 @@ int main(void) {
|
||||
size_t got = 0;
|
||||
SYS_FILE_IO_REQUEST readReq = SysMakeFileIoRequest(file, gBuf, sizeof(gBuf), &got);
|
||||
s = SysReadFile(&readReq);
|
||||
if (s != STATUS_SUCCESS)
|
||||
if (s != NTLSTATUS_SUCCESS)
|
||||
fail_status("read", s);
|
||||
if (got == 0)
|
||||
break;
|
||||
@@ -138,7 +138,7 @@ int main(void) {
|
||||
if (total < MIN_PRESSURE_BYTES)
|
||||
fail("asset read was too short to pressure the cache");
|
||||
|
||||
if (query_cache(&after) != STATUS_SUCCESS)
|
||||
if (query_cache(&after) != NTLSTATUS_SUCCESS)
|
||||
fail("final cache stats query failed");
|
||||
|
||||
uint64_t loads = after.Loads - before.Loads;
|
||||
|
||||
Reference in new issue
Block a user