diff options
Diffstat (limited to 'src/user/include')
-rw-r--r-- | src/user/include/knob/block.h | 7 | ||||
-rw-r--r-- | src/user/include/knob/user.h | 3 | ||||
-rw-r--r-- | src/user/include/pland/syscall.h | 6 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/user/include/knob/block.h b/src/user/include/knob/block.h new file mode 100644 index 0000000..2aa2b36 --- /dev/null +++ b/src/user/include/knob/block.h @@ -0,0 +1,7 @@ +#ifndef KNOB_BLOCK_H +#define KNOB_BLOCK_H + +void blockcpy(void *to, const void *from, uint32_t size); +bool blockequ(void *a, void *b, uint32_t size) __attribute__ ((__pure__)); + +#endif
\ No newline at end of file diff --git a/src/user/include/knob/user.h b/src/user/include/knob/user.h index c4ec7db..45caab4 100644 --- a/src/user/include/knob/user.h +++ b/src/user/include/knob/user.h @@ -6,7 +6,8 @@ void tell_user_sz(const char *sz); void tell_user_n(uint32_t n); -//return value and max_length both include null terminator +//return value and max_length don't include null terminator +//returns the real length of the string uint32_t ask_user_line_sz(char *sz, uint32_t max_length); #endif
\ No newline at end of file diff --git a/src/user/include/pland/syscall.h b/src/user/include/pland/syscall.h index 298fc51..c597e2b 100644 --- a/src/user/include/pland/syscall.h +++ b/src/user/include/pland/syscall.h @@ -97,7 +97,7 @@ static inline uint32_t _sc5(enum _scn eax, uint32_t ebx, uint32_t ecx, uint32_t static inline void _yield_task() { asm ( "int $0x39" - ); + : : : "eax"); } __attribute__ ((noreturn)) @@ -124,8 +124,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) { - return (bool)_sc2(_SCN_START_TASK, drive_number, (uint32_t)path); +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 void _log_string(const char *sz) { |