rewrite init to restart failed processes, add file renaming, directory creation, directory renaming, directory removal, add process killing, unify shells, readme changes.
This commit is contained in:
1 parent
f80e66ecde
commit
ddb074f0e0
16 files changed
+476
-641
No files matched your search
+11
-2
@@ -82,7 +82,7 @@ uint64_t SysMouseRead(int* dx, int* dy, uint8_t* buttons); // 46
|
||||
void SysMouseGetPos(int* x, int* y); // 47
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// System Info & Process Management (48-53)
|
||||
// System Info & Process Management (48-65)
|
||||
// ---------------------------------------------------------------------------
|
||||
uint64_t SysGetTick(void); // 48
|
||||
uint32_t SysDebugPrint(const char* str); // 49
|
||||
@@ -100,7 +100,7 @@ uint32_t SysSetCwd(const char* path); // 56
|
||||
uint32_t SysGetCwd(char* buf, size_t size); // 57
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Process/Thread Helpers & Named Queues (58-63)
|
||||
// Process/Thread Helpers & Named Queues (58-65)
|
||||
// ---------------------------------------------------------------------------
|
||||
uint32_t SysWaitThread(uint32_t tid); // 58
|
||||
uint32_t SysGetProcessPid(uint32_t handle, uint32_t* pidOut); // 59
|
||||
@@ -108,3 +108,12 @@ uint32_t SysPublishQueue(const char* name, uint32_t handle); // 60
|
||||
uint32_t SysOpenNamedQueue(const char* name, uint32_t* handleOut); // 61
|
||||
uint32_t SysQueueDuplicate(uint32_t handle, uint32_t targetPid, uint32_t* handleOut); // 62
|
||||
uint32_t SysNamedQueueOwnerPid(const char* name, uint32_t* pidOut); // 63
|
||||
uint32_t SysKillProcess(uint32_t pid, int exitCode); // 64
|
||||
uint32_t SysGetProcessList(uint32_t* pidsOut, size_t maxCount, size_t* countOut); // 65
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Filesystem mutations (66-68)
|
||||
// ---------------------------------------------------------------------------
|
||||
uint32_t SysRenameFile(const char* oldPath, const char* newPath); // 66
|
||||
uint32_t SysCreateDir(const char* path); // 67
|
||||
uint32_t SysRemoveDir(const char* path); // 68
|
||||
@@ -64,5 +64,10 @@ SYS_PUBLISH_QUEUE EQU 60
|
||||
SYS_OPEN_NAMED_QUEUE EQU 61
|
||||
SYS_QUEUE_DUPLICATE EQU 62
|
||||
SYS_NAMED_QUEUE_OWNER_PID EQU 63
|
||||
SYS_KILL_PROCESS EQU 64
|
||||
SYS_GET_PROCESS_LIST EQU 65
|
||||
SYS_RENAME_FILE EQU 66
|
||||
SYS_CREATE_DIR EQU 67
|
||||
SYS_REMOVE_DIR EQU 68
|
||||
|
||||
SYS_MAX EQU 64
|
||||
SYS_MAX EQU 69
|
||||
@@ -199,4 +199,17 @@ SYSCALL_STUB2 OpenNamedQueue, SYS_OPEN_NAMED_QUEUE ; (const char* name, ui
|
||||
SYSCALL_STUB2 QueueDuplicate, SYS_QUEUE_DUPLICATE ; (uint32_t handle, uint32_t targetPid, uint32_t* handleOut) -> KSTATUS
|
||||
SYSCALL_STUB2 NamedQueueOwnerPid, SYS_NAMED_QUEUE_OWNER_PID ; (const char* name, uint32_t* pidOut) -> KSTATUS
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Process utilities
|
||||
; ---------------------------------------------------------------------------
|
||||
SYSCALL_STUB2 KillProcess, SYS_KILL_PROCESS ; (uint32_t pid, int exitCode) -> KSTATUS
|
||||
SYSCALL_STUB2 GetProcessList, SYS_GET_PROCESS_LIST ; (uint32_t* pidsOut, size_t maxCount, size_t* countOut) -> KSTATUS
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Filesystem mutations
|
||||
; ---------------------------------------------------------------------------
|
||||
SYSCALL_STUB2 RenameFile, SYS_RENAME_FILE ; (const char* oldPath, const char* newPath) -> KSTATUS
|
||||
SYSCALL_STUB2 CreateDir, SYS_CREATE_DIR ; (const char* path) -> KSTATUS
|
||||
SYSCALL_STUB2 RemoveDir, SYS_REMOVE_DIR ; (const char* path) -> KSTATUS
|
||||
|
||||
END
|
||||
Reference in new issue
Block a user