diff options
author | Benji Dial <benji6283@gmail.com> | 2020-09-13 19:51:09 -0400 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2020-09-13 19:51:09 -0400 |
commit | 143156f63e2448733f1a35a74e629fe0ae9bb567 (patch) | |
tree | bcf70a6940038986da2cfb2d6ed380ed8ebb91de /src/user/include/pland/syscall.h | |
parent | 54101cf327b7def90636babbadbb66ce697298ee (diff) | |
download | portland-os-143156f63e2448733f1a35a74e629fe0ae9bb567.tar.gz |
have command shell block while commands are running
Diffstat (limited to 'src/user/include/pland/syscall.h')
-rw-r--r-- | src/user/include/pland/syscall.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/user/include/pland/syscall.h b/src/user/include/pland/syscall.h index c597e2b..75383fc 100644 --- a/src/user/include/pland/syscall.h +++ b/src/user/include/pland/syscall.h @@ -8,6 +8,7 @@ typedef uint32_t _file_handle_t; typedef uint32_t _task_handle_t; typedef uint32_t _drive_number_t; typedef uint32_t _pages_t; +typedef uint32_t _process_handle_t; typedef enum { _KEY_BACKSPACE = '\b', @@ -43,7 +44,8 @@ enum _scn { _SCN_LOG_STRING, _SCN_GET_KEY, _SCN_ALLOCATE_RAM, - _SCN_MEMORY_INFO + _SCN_MEMORY_INFO, + _SCN_WAIT_FOR_TASK }; static inline uint32_t _sc0(enum _scn eax) { @@ -124,8 +126,8 @@ static inline uint32_t _file_size(_file_handle_t handle) { return _sc1(_SCN_FILE_SIZE, handle); } -static inline bool _start_task(_drive_number_t drive_number, const char *path, const char *pass) { - return (bool)_sc3(_SCN_START_TASK, drive_number, (uint32_t)path, (uint32_t)pass); +static inline _process_handle_t _start_task(_drive_number_t drive_number, const char *path, const char *pass) { + return _sc3(_SCN_START_TASK, drive_number, (uint32_t)path, (uint32_t)pass); } static inline void _log_string(const char *sz) { @@ -160,4 +162,8 @@ static inline _pages_t _this_process_memory_left() { return _sc1(_SCN_MEMORY_INFO, 0x4); } +static inline void _wait_for_task(_process_handle_t handle) { + _sc1(_SCN_WAIT_FOR_TASK, handle); +} + #endif
\ No newline at end of file |