diff options
author | Austin Clements <[email protected]> | 2012-02-17 23:20:13 -0500 |
---|---|---|
committer | Austin Clements <[email protected]> | 2012-02-17 23:20:13 -0500 |
commit | 9d59eb015141697da616a4b98ac27cf4269cd780 (patch) | |
tree | 1fc16f0aff8d60a4cf1b3c29f6b0628d3fd04f16 /defs.h | |
parent | 12abb1a56164a0d71fb7a76a465c912409f2f60b (diff) | |
download | xv6-labs-9d59eb015141697da616a4b98ac27cf4269cd780.tar.gz xv6-labs-9d59eb015141697da616a4b98ac27cf4269cd780.tar.bz2 xv6-labs-9d59eb015141697da616a4b98ac27cf4269cd780.zip |
Make fetchint and fetchstr use proc instead of taking a struct proc
Previously, these were inconsistent: they used their struct proc
argument for bounds checking, but always copied the argument from the
current address space (and hence the current process). Drop the
struct proc argument and always use the current proc.
Suggested by Carmi Merimovich.
Diffstat (limited to 'defs.h')
-rw-r--r-- | defs.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -142,8 +142,8 @@ char* strncpy(char*, const char*, int); int argint(int, int*); int argptr(int, char**, int); int argstr(int, char**); -int fetchint(struct proc*, uint, int*); -int fetchstr(struct proc*, uint, char**); +int fetchint(uint, int*); +int fetchstr(uint, char**); void syscall(void); // timer.c |