From 1120b4065529f6bd799e037e5de0f8f604ddce06 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Sat, 11 Nov 2023 00:07:26 +0100 Subject: [PATCH] Rename Yolo syscall to Helo --- core/syscall.c | 4 ++-- core/syscall.h | 2 +- tests/test.c | 2 +- userspace/kernel/syscall.h | 2 +- userspace/libc.c | 4 ++-- userspace/libc.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/syscall.c b/core/syscall.c index 1cff6cd..b836c67 100644 --- a/core/syscall.c +++ b/core/syscall.c @@ -22,8 +22,8 @@ int syscallExecute(int syscallId, const struct cpu_state *userCtx) assert(0); break; } - case SYSCALL_ID_YOLO: - ret = printf("YOLO FROM USERSPACE\n"); + case SYSCALL_ID_HELO: + ret = printf("HELLO FROM USERSPACE\n"); break; case SYSCALL_ID_PUTC: { unsigned int c; diff --git a/core/syscall.h b/core/syscall.h index dbf1858..099e51a 100644 --- a/core/syscall.h +++ b/core/syscall.h @@ -4,7 +4,7 @@ #endif #define SYSCALL_ID_EXIT 1 -#define SYSCALL_ID_YOLO 2 +#define SYSCALL_ID_HELO 2 #define SYSCALL_ID_PUTC 3 #define SYSCALL_ID_READ 4 #define SYSCALL_ID_TEST 5 diff --git a/tests/test.c b/tests/test.c index 3bd9417..2dd6c45 100644 --- a/tests/test.c +++ b/tests/test.c @@ -399,7 +399,7 @@ static void userProgramm() "int %5\n" "movl %%eax, %0" : "=g"(ret) - : "g"(SYSCALL_ID_YOLO), "g"(0), "g"(0), "g"(0), "i"(SYSCALL_INTR_NB) + : "g"(SYSCALL_ID_HELO), "g"(0), "g"(0), "g"(0), "i"(SYSCALL_INTR_NB) : "eax", "ebx", "ecx", "edx"); asm volatile("movl %1,%%eax \n" "movl %2,%%ebx \n" diff --git a/userspace/kernel/syscall.h b/userspace/kernel/syscall.h index dbf1858..099e51a 100644 --- a/userspace/kernel/syscall.h +++ b/userspace/kernel/syscall.h @@ -4,7 +4,7 @@ #endif #define SYSCALL_ID_EXIT 1 -#define SYSCALL_ID_YOLO 2 +#define SYSCALL_ID_HELO 2 #define SYSCALL_ID_PUTC 3 #define SYSCALL_ID_READ 4 #define SYSCALL_ID_TEST 5 diff --git a/userspace/libc.c b/userspace/libc.c index 2e660d9..5edcbdc 100644 --- a/userspace/libc.c +++ b/userspace/libc.c @@ -521,9 +521,9 @@ int putc(const int c){ return syscall1(SYSCALL_ID_PUTC, c); } -void yolo() +void helo() { - syscall0(SYSCALL_ID_YOLO); + syscall0(SYSCALL_ID_HELO); } int testSycall5(uint arg1, uint arg2, uint arg3, uint arg4, uint arg5) diff --git a/userspace/libc.h b/userspace/libc.h index 1c9b83c..c9323c8 100644 --- a/userspace/libc.h +++ b/userspace/libc.h @@ -42,7 +42,7 @@ int syscall1(int id, unsigned int arg1); int syscall0(int id); void _exit(int status); -void yolo(); +void helo(); int testSycall5(uint arg1, uint arg2, uint arg3, uint arg4, uint arg5); char readc(); char getchar();