mark _EsSyscall private

This commit is contained in:
nakst 2021-10-09 22:05:09 +01:00
parent b79a286045
commit 969ca8e4c4
4 changed files with 13 additions and 7 deletions

View File

@ -237,14 +237,14 @@ void UpdateDisplay(Instance *instance, int index) {
EsPanelSwitchTo(instance->switcher, instance->listViewProcesses, ES_TRANSITION_NONE);
EsElementFocus(instance->listViewProcesses);
} else if (index == DISPLAY_GENERAL_LOG) {
size_t bytes = EsSyscall(ES_SYSCALL_DEBUG_COMMAND, index, (uintptr_t) generalLogBuffer, sizeof(generalLogBuffer), 0);
size_t bytes = _EsDebugCommand(index, (uintptr_t) generalLogBuffer, sizeof(generalLogBuffer), 0);
EsTextboxSelectAll(instance->textboxGeneralLog);
EsTextboxInsert(instance->textboxGeneralLog, generalLogBuffer, bytes);
EsTextboxEnsureCaretVisible(instance->textboxGeneralLog, false);
EsPanelSwitchTo(instance->switcher, instance->textboxGeneralLog, ES_TRANSITION_NONE);
} else if (index == DISPLAY_MEMORY) {
EsMemoryStatistics statistics = {};
EsSyscall(ES_SYSCALL_DEBUG_COMMAND, index, (uintptr_t) &statistics, 0, 0);
_EsDebugCommand(index, (uintptr_t) &statistics, 0, 0);
EsPanelSwitchTo(instance->switcher, instance->panelMemoryStatistics, ES_TRANSITION_NONE);

View File

@ -763,7 +763,7 @@ enum EsFatalError {
ES_FATAL_ERROR_COUNT
}
enum EsSyscallType {
private enum EsSyscallType {
// Memory.
ES_SYSCALL_MEMORY_ALLOCATE
@ -1179,7 +1179,7 @@ struct EsElementPublic {
uint64_t flags; // Bits 0-31: specific to the type of element; bits 32-63: common to all elements.
};
struct EsBatchCall {
private struct EsBatchCall {
EsSyscallType index;
bool stopBatchIfError;
union { uintptr_t argument0, returnValue; };
@ -1241,7 +1241,7 @@ struct EsMutex {
struct EsCrashReason {
EsFatalError errorCode;
EsSyscallType duringSystemCall;
int32_t duringSystemCall;
}
struct EsProcessState {
@ -1949,8 +1949,9 @@ function void EsPOSIXInitialise(int *argc, char ***argv);
function intptr_t EsPOSIXSystemCall(intptr_t n, intptr_t a1, intptr_t a2, intptr_t a3, intptr_t a4, intptr_t a5, intptr_t a6);
function char *EsPOSIXConvertPath(const char *path, size_t *outNameLength, bool addPOSIXMountPointPrefix);
function void EsBatch(EsBatchCall *calls, size_t count);
function uintptr_t _EsSyscall(uintptr_t a, uintptr_t b, uintptr_t c, uintptr_t d, uintptr_t e, uintptr_t f);
private function void EsBatch(EsBatchCall *calls, size_t count);
private function uintptr_t _EsSyscall(uintptr_t a, uintptr_t b, uintptr_t c, uintptr_t d, uintptr_t e, uintptr_t f);
function uintptr_t _EsDebugCommand(uintptr_t a, uintptr_t b, uintptr_t c, uintptr_t d);
// Configuration and settings.

View File

@ -911,3 +911,7 @@ size_t EsPipeWrite(EsHandle pipe, const void *buffer, size_t bytes) {
EsError EsDeviceControl(EsHandle handle, EsDeviceControlType type, void *dp, void *dq) {
return EsSyscall(ES_SYSCALL_DEVICE_CONTROL, handle, type, (uintptr_t) dp, (uintptr_t) dq);
}
uintptr_t _EsDebugCommand(uintptr_t a, uintptr_t b, uintptr_t c, uintptr_t d) {
return EsSyscall(ES_SYSCALL_DEBUG_COMMAND, a, b, c, d);
}

View File

@ -489,3 +489,4 @@ EsScrollViewIsBarEnabled=487
EsScrollViewIsInDragScroll=488
_EsOpenDocumentEnumerate=489
EsDialogGetContentArea=490
_EsDebugCommand=491