summaryrefslogtreecommitdiff
path: root/syscall.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-31Read curproc from cpu structure, but be careful because after a schedule eventFrans Kaashoek1-9/+14
myproc() points to a different thread. myproc(); sched(); myproc(); // this proc maybe different than the one before sched Thus, in a function that operates on one thread better to retrieve the current process once at the start of the function.
2017-01-31Start of an experiment to remove the use of gs for cpu local variables.Frans Kaashoek1-10/+11
2016-09-26fix memory region validation in argptr()MikeCAT1-1/+1
2016-09-25Typo (Thanks to Austin Liew)Frans Kaashoek1-1/+1
2016-08-25Remove trailing white space with:Frans Kaashoek1-1/+1
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done (Thanks to Nicolás Wolovick)
2012-08-22Remove left-over from some logging plan making complete syscalls atomicFrans Kaashoek1-3/+1
0 is not a system call (thanks to Peter Froehlich)
2012-02-17Make fetchint and fetchstr use proc instead of taking a struct procAustin Clements1-9/+9
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.
2011-08-22Remove sys_init syscallFrans Kaashoek1-9/+0
Invoke initlog from forkret on first user process
2011-08-12log write() dataRobert Morris1-2/+0
usertest for big write()s push begin_trans/commit_trans down into syscalls
2011-07-29Map kernel highFrans Kaashoek1-0/+1
Very important to give qemu memory through PHYSTOP :(
2011-07-27Dirt simple loggingFrans Kaashoek1-18/+31
Passes usertests and stressfs Seems to recover correctly in a number of simple cases
2011-02-28fixes from Peter FroehlichRuss Cox1-1/+1
2011-01-11make new code like old codeRuss Cox1-5/+4
Variable declarations at top of function, separate from initialization. Use == 0 instead of ! for checking pointers. Consistent spacing around {, *, casts. Declare 0-parameter functions as (void) not (). Integer valued functions return -1 on failure, 0 on success.
2010-09-01Remove the stack guard page. Processes are now contiguous from 0 to ↵Austin Clements1-4/+1
proc->sz, which means our syscall argument validation is correct. Add a pointer validation test and remove the stack test, which tested for the guard page.
2010-08-11uptime() sys call for benchmarkingRobert Morris1-0/+2
increase PHYSTOP
2010-07-02nitsFrans Kaashoek1-4/+2
2010-07-02Initial version of single-cpu xv6 with page tablesFrans Kaashoek1-5/+11
2009-08-30assorted fixes:Russ Cox1-8/+8
* rename c/cp to cpu/proc * rename cpu.context to cpu.scheduler * fix some comments * formatting for printout
2007-08-28spaces around else for rtmrsc1-1/+1
2007-08-28more consistent spacingrsc1-1/+1
2007-08-27make code match commentrsc1-1/+1
2007-08-27make code match commentrsc1-7/+6
2007-08-27delete unnecessary #include linesrsc1-10/+1
2007-08-27Replace yield system call with sleep.rsc1-2/+2
2007-08-24nitsrsc1-2/+3
2007-08-24Add yield system call, for zombie test program (bad idea?).rsc1-0/+2
2007-08-24simplify ide queuingrtm1-1/+1
nits in comments
2007-08-21Various cleanup:rsc1-1/+0
- Got rid of dummy proc[0]. Now proc[0] is init. - Added initcode.S to exec /init, so that /init is just a regular binary. - Moved exec out of sysfile to exec.c - Moved code dealing with fs guts (like struct inode) from sysfile.c to fs.c. Code dealing with system call arguments stays in sysfile.c - Refactored directory routines in fs.c; should be simpler. - Changed iget to return *unlocked* inode structure. This solves the lookup-then-use race in namei without introducing deadlocks. It also enabled getting rid of the dummy proc[0].
2007-08-14formattingrsc1-0/+1
2007-08-10Make cp a magic symbol.rsc1-4/+1
2007-08-09try to use cp only for curproc[cpu()]rsc1-9/+9
2007-08-08convert syscall dispatch to tablersc1-64/+28
2006-09-07refactor syscall codersc1-32/+39
2006-09-07comment fixesrsc1-1/+1
2006-09-06for vs whilersc1-1/+1
2006-09-06fd.* -> file.*rsc1-1/+1
2006-09-06split syscall.c into sysfile.c and sysproc.crsc1-517/+19
2006-09-06writeable => writablersc1-3/+3
2006-09-06no /* */ commentsrsc1-14/+10
2006-09-06standardize various * conventionsrsc1-25/+25
2006-08-30complain if no disk 1rtm1-10/+1
lots of cleanup
2006-08-29clear killed flag in exitrtm1-3/+0
idecref cwd in exit
2006-08-29prune unneeded panics and debug outputrtm1-1/+1
2006-08-29i broke sbrk, fix itrtm1-2/+3
2006-08-29clean up stale error checks and panicsrtm1-3/+3
delete unused functions a few comments
2006-08-26consistently ignore more than 14 chars in path componentrtm1-8/+22
forbid create or write of existing directory mkdir("d1/d2/d3"), .. should refer to d2, not cwd mkdir increase parent link count
2006-08-26mkdir check error from mknodrtm1-2/+4
chdir return -1 if target not a dir
2006-08-25inode addrs[NDIRECT] -> NADDRSrtm1-11/+21
fix race in mknod / creat use last component in dirent in mknod, not path
2006-08-24user-level malloc (untested)kaashoek1-19/+5
nit in sbrk indirect block fix dup to share fd struct
2006-08-23i/o redirection in shkaashoek1-0/+29
better parsing of sh commands (copied from jos sh) cat: read from 1 if no args sbrk system call, but untested getpid system call moved locks in keyboard intr, but why do we get intr w. null characters from keyboard?