Add sys_hello and testbin/hellotest

`sys_hello` is a new syscall that just prints some text in the terminal.

`testbin/hellotest` is a userland binary that just calls `sys_hello`
This commit is contained in:
2024-09-10 13:08:41 -04:00
parent 4db0a014cd
commit c67c34e0ea
9 changed files with 36 additions and 1 deletions

View File

@@ -156,4 +156,6 @@ int execvp(const char *prog, char *const *args); /* calls execv */
char *getcwd(char *buf, size_t buflen); /* calls __getcwd */
time_t time(time_t *seconds); /* calls __time */
int hello(void);
#endif /* _UNISTD_H_ */

View File

@@ -7,7 +7,7 @@ TOP=../..
SUBDIRS=add argtest badcall bigexec bigfile bigfork bigseek bloat conman \
crash ctest dirconc dirseek dirtest f_test factorial farm faulter \
filetest forkbomb forktest frack hash hog huge \
filetest forkbomb forktest frack hash hellotest hog huge \
malloctest matmult multiexec palin parallelvm poisondisk psort \
randcall redirect rmdirtest rmtest \
sbrktest schedpong sort sparsefile tail tictac triplehuge \

View File

@@ -0,0 +1,11 @@
# Makefile for hello
TOP=../../..
.include "$(TOP)/mk/os161.config.mk"
PROG=hellotest
SRCS=hello.c
BINDIR=/testbin
.include "$(TOP)/mk/os161.prog.mk"

View File

@@ -0,0 +1,8 @@
#include <unistd.h>
extern int hello(void);
int main() {
hello();
return 0;
}