diff options
| author | Frans Kaashoek <kaashoek@mit.edu> | 2022-09-25 20:00:42 -0400 |
|---|---|---|
| committer | Frans Kaashoek <kaashoek@mit.edu> | 2022-09-25 20:00:42 -0400 |
| commit | c826bd8176c764a7ae385ba6567afc0cd91cfc69 (patch) | |
| tree | dfb0fe3332dfc7264963169d8ba761d9ad9a68ae /user/call.c | |
| parent | 4b46c0c6eb464782faa36d158246ba4e3238c970 (diff) | |
| download | xv6-labs-2022-origin/traps.tar.xz xv6-labs-2022-origin/traps.zip | |
traps laborigin/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); +} |
