Skip to content

Commit 9c7a1f9

Browse files
committed
[code] tp.c in tp5 updated
1 parent fcd03f5 commit 9c7a1f9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tp5/tp.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
/* GPLv2 (c) Airbus */
22
#include <debug.h>
33

4+
void syscall_isr() {
5+
asm volatile (
6+
"leave ; pusha \n"
7+
"mov %%esp, %eax \n"
8+
"call syscall_handler \n"
9+
"popa ; iret"
10+
);
11+
}
12+
13+
void __regparm__(1) syscall_handler(int_ctx_t *ctx) {
14+
debug("SYSCALL eax = %p\n", ctx->gpr.eax);
15+
}
16+
417
void userland() {
518
// TODO à compléter
619
while(1);

0 commit comments

Comments
 (0)