Commit 30dd6b34 authored by Amir Hosein Kashani's avatar Amir Hosein Kashani

start of 2.1

parent a4c94803
Pipeline #1536 failed with stages
......@@ -27,6 +27,8 @@ OBJS = \
uart.o\
vectors.o\
vm.o\
# Cross-compiling (e.g., on Mac OS X)
# TOOLPREFIX = i386-jos-elf
......@@ -181,6 +183,7 @@ UPROGS=\
_usertests\
_wc\
_zombie\
_test\
fs.img: mkfs README $(UPROGS)
./mkfs fs.img README $(UPROGS)
......@@ -249,7 +252,7 @@ qemu-nox-gdb: fs.img xv6.img .gdbinit
EXTRA=\
mkfs.c ulib.c user.h cat.c echo.c forktest.c grep.c kill.c\
ln.c ls.c mkdir.c rm.c stressfs.c usertests.c wc.c zombie.c\
ln.c ls.c mkdir.c rm.c stressfs.c usertests.c wc.c zombie.c\test.c\
printf.c umalloc.c\
README dot-bochsrc *.pl toc.* runoff runoff1 runoff.list\
.gdbinit.tmpl gdbutil\
......
......@@ -103,6 +103,7 @@ extern int sys_unlink(void);
extern int sys_wait(void);
extern int sys_write(void);
extern int sys_uptime(void);
extern int sys_getChildren(void);
static int (*syscalls[])(void) = {
[SYS_fork] sys_fork,
......@@ -126,6 +127,7 @@ static int (*syscalls[])(void) = {
[SYS_link] sys_link,
[SYS_mkdir] sys_mkdir,
[SYS_close] sys_close,
[SYS_getChildren] sys_getChildren,
};
void
......
......@@ -20,3 +20,4 @@
#define SYS_link 19
#define SYS_mkdir 20
#define SYS_close 21
#define SYS_getChildren 22
......@@ -10,7 +10,10 @@
int
sys_fork(void)
{
return fork();
int dadPid = pid;
int pidChild = fork();
return
}
int
......@@ -89,3 +92,19 @@ sys_uptime(void)
release(&tickslock);
return xticks;
}
//my implimentation
int
sys_getChildren(void)
{
return 120;
}
#include "types.h"
#include "stat.h"
#include "user.h"
int
main(void)
{
printf(1, "My first xv6 program\n");
exit();
}
......@@ -23,6 +23,9 @@ int getpid(void);
char* sbrk(int);
int sleep(int);
int uptime(void);
int getChildren(void);
// ulib.c
int stat(const char*, struct stat*);
......
......@@ -29,3 +29,4 @@ SYSCALL(getpid)
SYSCALL(sbrk)
SYSCALL(sleep)
SYSCALL(uptime)
SYSCALL(getChildren)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment