diff options
author | Sanjit Bhat <[email protected]> | 2023-09-13 01:24:07 -0400 |
---|---|---|
committer | Sanjit Bhat <[email protected]> | 2023-09-13 01:24:07 -0400 |
commit | e7ad79c0c51a27efcdcc94c4bc848ca0f41937e1 (patch) | |
tree | 05f5b9b2de7af2ef674070b1e4cd690a9b521f58 /user/call.c | |
parent | 74c1eba516fdb0ec1a17b16be7e76613ccba92bf (diff) | |
download | xv6-labs-e7ad79c0c51a27efcdcc94c4bc848ca0f41937e1.tar.gz xv6-labs-e7ad79c0c51a27efcdcc94c4bc848ca0f41937e1.tar.bz2 xv6-labs-e7ad79c0c51a27efcdcc94c4bc848ca0f41937e1.zip |
release traps
Diffstat (limited to 'user/call.c')
-rw-r--r-- | user/call.c | 17 |
1 files changed, 17 insertions, 0 deletions
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); +} |