Compare commits
No commits in common. "ASST2/add-syscall" and "main" have entirely different histories.
ASST2/add-
...
main
@ -104,9 +104,6 @@ void syscall(struct trapframe *tf) {
|
|||||||
case SYS___time:
|
case SYS___time:
|
||||||
err = sys___time((userptr_t)tf->tf_a0, (userptr_t)tf->tf_a1);
|
err = sys___time((userptr_t)tf->tf_a0, (userptr_t)tf->tf_a1);
|
||||||
break;
|
break;
|
||||||
case SYS_hello:
|
|
||||||
err = sys_hello();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SYS__exit:
|
case SYS__exit:
|
||||||
err = 0;
|
err = 0;
|
||||||
|
|||||||
@ -379,7 +379,6 @@ file vfs/devnull.c
|
|||||||
file syscall/loadelf.c
|
file syscall/loadelf.c
|
||||||
file syscall/runprogram.c
|
file syscall/runprogram.c
|
||||||
file syscall/time_syscalls.c
|
file syscall/time_syscalls.c
|
||||||
file syscall/hello.c
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Startup and initialization
|
# Startup and initialization
|
||||||
|
|||||||
@ -94,7 +94,6 @@
|
|||||||
// #define SYS_getpriority 38
|
// #define SYS_getpriority 38
|
||||||
// #define SYS_setpriority 39
|
// #define SYS_setpriority 39
|
||||||
// (process groups, sessions, and job control)
|
// (process groups, sessions, and job control)
|
||||||
#define SYS_hello 41
|
|
||||||
// #define SYS_getpgid 40
|
// #define SYS_getpgid 40
|
||||||
// #define SYS_setpgid 41
|
// #define SYS_setpgid 41
|
||||||
// #define SYS_getsid 42
|
// #define SYS_getsid 42
|
||||||
|
|||||||
@ -57,6 +57,4 @@ __DEAD void enter_new_process(int argc, userptr_t argv, userptr_t env,
|
|||||||
int sys_reboot(int code);
|
int sys_reboot(int code);
|
||||||
int sys___time(userptr_t user_seconds, userptr_t user_nanoseconds);
|
int sys___time(userptr_t user_seconds, userptr_t user_nanoseconds);
|
||||||
|
|
||||||
int sys_hello(void);
|
|
||||||
|
|
||||||
#endif /* _SYSCALL_H_ */
|
#endif /* _SYSCALL_H_ */
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
#include <types.h>
|
|
||||||
#include <lib.h>
|
|
||||||
#include <syscall.h>
|
|
||||||
int sys_hello(void) {
|
|
||||||
kprintf("Hello CSE4001!\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@ -156,6 +156,4 @@ int execvp(const char *prog, char *const *args); /* calls execv */
|
|||||||
char *getcwd(char *buf, size_t buflen); /* calls __getcwd */
|
char *getcwd(char *buf, size_t buflen); /* calls __getcwd */
|
||||||
time_t time(time_t *seconds); /* calls __time */
|
time_t time(time_t *seconds); /* calls __time */
|
||||||
|
|
||||||
int hello(void);
|
|
||||||
|
|
||||||
#endif /* _UNISTD_H_ */
|
#endif /* _UNISTD_H_ */
|
||||||
|
|||||||
@ -7,7 +7,7 @@ TOP=../..
|
|||||||
|
|
||||||
SUBDIRS=add argtest badcall bigexec bigfile bigfork bigseek bloat conman \
|
SUBDIRS=add argtest badcall bigexec bigfile bigfork bigseek bloat conman \
|
||||||
crash ctest dirconc dirseek dirtest f_test factorial farm faulter \
|
crash ctest dirconc dirseek dirtest f_test factorial farm faulter \
|
||||||
filetest forkbomb forktest frack hash hellotest hog huge \
|
filetest forkbomb forktest frack hash hog huge \
|
||||||
malloctest matmult multiexec palin parallelvm poisondisk psort \
|
malloctest matmult multiexec palin parallelvm poisondisk psort \
|
||||||
randcall redirect rmdirtest rmtest \
|
randcall redirect rmdirtest rmtest \
|
||||||
sbrktest schedpong sort sparsefile tail tictac triplehuge \
|
sbrktest schedpong sort sparsefile tail tictac triplehuge \
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
# Makefile for hello
|
|
||||||
|
|
||||||
TOP=../../..
|
|
||||||
.include "$(TOP)/mk/os161.config.mk"
|
|
||||||
|
|
||||||
PROG=hellotest
|
|
||||||
SRCS=hello.c
|
|
||||||
BINDIR=/testbin
|
|
||||||
|
|
||||||
.include "$(TOP)/mk/os161.prog.mk"
|
|
||||||
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
extern int hello(void);
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
hello();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user