aboutsummaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-04 06:16:18 -0500
committerMustafa Quraish <[email protected]>2022-02-05 08:56:15 -0500
commit8fd0a145947011f113abaab245e35f1adfb6eb48 (patch)
tree957bcf38c33d697c2fe5dd997bc294ae28adcaec /src/utils.h
parentUpdate README.md (diff)
downloadcup-8fd0a145947011f113abaab245e35f1adfb6eb48.tar.xz
cup-8fd0a145947011f113abaab245e35f1adfb6eb48.zip
Allow `builtins.c` to inject constants into program, use for syscalls
We can now directly expose the `syscallN()` APIs to the program and define the `open()`, `write()` etc syscalls in the stdlib. This simplifies the implementation a decent bunch :^)
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h
index 7718c1c..fbd3aac 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -11,5 +11,7 @@ i64 i64min(i64 a, i64 b);
// Assumes alignment is a power of 2
i64 align_up(i64 val, i64 align);
+i64 get_syscall_num(i64 orig_syscall);
+
#define die_location(loc, ...) _die_location(__FILE__, __LINE__, loc, __VA_ARGS__) \ No newline at end of file