From e7ad79c0c51a27efcdcc94c4bc848ca0f41937e1 Mon Sep 17 00:00:00 2001 From: Sanjit Bhat Date: Wed, 13 Sep 2023 01:24:07 -0400 Subject: release traps --- user/call.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 user/call.c (limited to 'user/call.c') diff --git a/user/call.c b/user/call.c new file mode 100644 index 0000000..f725dcb --- /dev/null +++ b/user/call.c @@ -0,0 +1,17 @@ +#include "kernel/param.h" +#include "kernel/types.h" +#include "kernel/stat.h" +#include "user/user.h" + +int g(int x) { + return x+3; +} + +int f(int x) { + return g(x); +} + +void main(void) { + printf("%d %d\n", f(8)+1, 13); + exit(0); +} -- cgit v1.2.3