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
@@ -2,6 +2,7 @@
|
||||
// Reads this test executable through SysReadFile and checks cache behavior when
|
||||
// the image is large enough to apply pressure.
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
@@ -44,7 +45,7 @@ static void fail(const char* msg) {
|
||||
exit_now(1);
|
||||
}
|
||||
|
||||
static void fail_status(const char* what, uint32_t status) {
|
||||
static void fail_status(const char* what, KSTATUS status) {
|
||||
print("pcache_pressure: ");
|
||||
print(what);
|
||||
print(" failed status=");
|
||||
@@ -60,16 +61,16 @@ static uint32_t query_cache(SYS_FILE_CACHE_STATS* out) {
|
||||
static char gSelfPath[SYS_PATH_MAX];
|
||||
|
||||
// Copies a string view into a fixed NUL-terminated buffer.
|
||||
static int copy_view(char* out, size_t outSize, SYS_STRING_VIEW view) {
|
||||
static bool copy_view(char* out, size_t outSize, SYS_STRING_VIEW view) {
|
||||
if (!out || outSize == 0 || !view.Data || view.Length + 1 > outSize)
|
||||
return 0;
|
||||
return false;
|
||||
memcpy(out, view.Data, view.Length);
|
||||
out[view.Length] = '\0';
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Opens this process image as the cache-pressure input file.
|
||||
static uint32_t open_self_image(uint32_t* fileOut, const char** pathOut, uint64_t* sizeOut) {
|
||||
static KSTATUS open_self_image(uint32_t* fileOut, const char** pathOut, uint64_t* sizeOut) {
|
||||
SYS_PEB* peb = SysGetPeb();
|
||||
if (!peb || peb->Magic != SYS_PEB_MAGIC || peb->Version != SYS_ENV_VERSION)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -77,7 +78,7 @@ static uint32_t open_self_image(uint32_t* fileOut, const char** pathOut, uint64_
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
uint32_t h = 0;
|
||||
uint32_t s = NtlOpenFile(SysSvFromCstr(gSelfPath),
|
||||
KSTATUS s = NtlOpenFile(SysSvFromCstr(gSelfPath),
|
||||
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_QUERY,
|
||||
SYS_FILE_OPEN_EXISTING,
|
||||
SYS_FILE_FLAG_NONE,
|
||||
|
||||
Reference in new issue
Block a user