diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-27 14:05:45 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-27 14:05:45 -0400 |
commit | 53a3d70e238e423f8543164c0d4c5d2db2e1adbd (patch) | |
tree | 68ddde38efc0d759867ddba4999a2c260a08bc76 /user | |
parent | remove pit fixme (diff) | |
download | comus-53a3d70e238e423f8543164c0d4c5d2db2e1adbd.tar.gz comus-53a3d70e238e423f8543164c0d4c5d2db2e1adbd.tar.bz2 comus-53a3d70e238e423f8543164c0d4c5d2db2e1adbd.zip |
new syscalls
Diffstat (limited to 'user')
-rw-r--r-- | user/include/unistd.h | 16 | ||||
-rw-r--r-- | user/lib/syscall.S | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/user/include/unistd.h b/user/include/unistd.h index bbacdbe..f080917 100644 --- a/user/include/unistd.h +++ b/user/include/unistd.h @@ -169,4 +169,20 @@ extern void *sbrk(intptr_t increment); */ extern int poweroff(void); +/** + * Gets access to the "direct rendering manager" (framebuffer) + * + * @param fb - address of framebuffer + * @param width - returns the width of the framebuffer + * @param height - returns the height of the framebuffer + * @param bpp - returns the bit depth of the framebuffer + * @returns 0 on success, error code on failure + */ +extern int drm(void **fb, int *width, int *height, int *bbp); + +/** + * @returns number of ticks the system has been up for (1ms) + */ +extern uint64_t ticks(void); + #endif /* unistd.h */ diff --git a/user/lib/syscall.S b/user/lib/syscall.S index c5a23b5..2ba4dc0 100644 --- a/user/lib/syscall.S +++ b/user/lib/syscall.S @@ -25,3 +25,5 @@ SYSCALL sleep SYS_sleep SYSCALL brk SYS_brk SYSCALL sbrk SYS_sbrk SYSCALL poweroff SYS_poweroff +SYSCALL drm SYS_drm +SYSCALL ticks SYS_ticks |