trapslab initialized
This commit is contained in:
14
user/ulib.c
14
user/ulib.c
@@ -1,13 +1,8 @@
|
||||
#include "kernel/types.h"
|
||||
#include "kernel/stat.h"
|
||||
#include "kernel/fcntl.h"
|
||||
#ifdef LAB_PGTBL
|
||||
#include "kernel/riscv.h"
|
||||
#include "kernel/memlayout.h"
|
||||
#endif
|
||||
#include "user/user.h"
|
||||
|
||||
|
||||
//
|
||||
// wrapper so that it's OK if main() does not call exit().
|
||||
//
|
||||
@@ -150,12 +145,3 @@ memcpy(void *dst, const void *src, uint n)
|
||||
{
|
||||
return memmove(dst, src, n);
|
||||
}
|
||||
|
||||
#ifdef LAB_PGTBL
|
||||
int
|
||||
ugetpid(void)
|
||||
{
|
||||
struct usyscall *u = (struct usyscall *)USYSCALL;
|
||||
return u->pid;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user