From 1d69a46f5d9823bbf2e6211ca367b409d2d5f7a7 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 1 Mar 2021 22:35:26 -0500 Subject: minimal file writing, shutdown keybinding (Win+Shift+Q) --- src/user/include/pland/syscall.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/user/include/pland') diff --git a/src/user/include/pland/syscall.h b/src/user/include/pland/syscall.h index 9518d09..3c4f421 100644 --- a/src/user/include/pland/syscall.h +++ b/src/user/include/pland/syscall.h @@ -51,7 +51,9 @@ enum _scn { _SCN_FIND_UNREAD_IPC, _SCN_WAIT_IPC_READ, _SCN_IS_TASK_RUNNING, - _SCN_GET_TIMESTAMP + _SCN_GET_TIMESTAMP, + _SCN_FILE_WRITE, + _SCN_SET_FILE_SIZE }; static inline uint32_t _sc0(enum _scn eax) { @@ -240,4 +242,12 @@ static inline uint32_t _get_timestamp() { return _sc0(_SCN_GET_TIMESTAMP); } +static inline uint32_t _file_write(_file_handle_t handle, uint32_t offset, uint32_t count, const void *from) { + return _sc4(_SCN_FILE_WRITE, handle, offset, count, (uint32_t)from); +} + +static inline void _set_file_size(_file_handle_t handle, uint32_t new_size) { + _sc2(_SCN_SET_FILE_SIZE, handle, new_size); +} + #endif \ No newline at end of file -- cgit v1.2.3