summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJake Mannens <jake72360@gmail.com>2018-07-08 01:44:13 +1000
committerJake Mannens <jake72360@gmail.com>2018-07-08 01:44:13 +1000
commit70b141b3af85771f36119165e072c1c45d64de84 (patch)
tree8c67026fc02c86ffc7328e13354adede5f0ea9ed /Makefile
parentec4f58e8e362e371718f656923c2d234f8ac215c (diff)
Added a printf() function to the library under stdio.c which uses the
vsprintf() function to render formatted strings and then the puts system call to output them. Moved the vsprintf() function from the kernel to the library. Furthermore, the prototype for the function has been moved from the kernel's headers, to the new header file stdio.h. Renamed the kernel's internal printf() function to printk() in order to avoid confusion with the library provided function. Renamed the sys_print system call to the more appropriate name, sys_puts. Added a new system call sys_time, which returns the system's uptime in seconds. This is mainly for testing the userspace binary and will not be permanent. Added the file time.c to the library which contains the caller for sys_time and a helper routine sleep() which delays execution for the specified number of seconds. The new header file time.h contains prototypes for both these functions as well as the definition for the type time_t. Fixed a bug in which the value of EAX was not properly passed to the system call handler, resulting in the wrong system call being executed. This was caused by the code in the SAVE macro not properly preserving the value. Fixed a bug in which the value of EAX was not preserved during a return from system call, but rather restored with the original EAX value prior to the call. As a result, system call return codes were not properly passed. This has been corrected by introducing a new macro RESTORE_SYS which carries out the same restore operations, but maintains EAX prior to the return.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions