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.
This commit is contained in:
		
							parent
							
								
									12abb1a561
								
							
						
					
					
						commit
						9d59eb0151
					
				
					 3 changed files with 13 additions and 13 deletions
				
			
		
							
								
								
									
										4
									
								
								defs.h
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								defs.h
									
										
									
									
									
								
							|  | @ -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
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Austin Clements
						Austin Clements