summaryrefslogtreecommitdiff
path: root/sysfile.c
AgeCommit message (Collapse)Author
2016-08-18Remove unused variable, nits.Peter H. Froehlich
2014-08-27a start at concurrent FS system callsRobert Morris
2014-08-04every iput() and namei() must be inside a transactionRobert Morris
2012-02-17Make fetchint and fetchstr use proc instead of taking a struct procAustin Clements
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-10-14don't let dirty blocks be evicted from cache!Robert Morris
2011-09-02Shorten sys_unlink a little; create now fits in columnAustin Clements
2011-08-29Revert "Introduce and use sleeplocks instead of BUSY flags"Frans Kaashoek
My changes have a race with re-used bufs and the code doesn't seem to get shorter Keep the changes that fixed ip->off race This reverts commit 3a5fa7ed9020eaf8ab843a16d26db7393b2ec072. Conflicts: defs.h file.c file.h
2011-08-26Introduce and use sleeplocks instead of BUSY flagsFrans Kaashoek
Remove I_BUSY, B_BUSY, and intrans defs and usages One spinlock per buf to avoid ugly loop in bget fix race in filewrite (don't update f->off after releasing lock)
2011-08-15avoid deadlock by calling begin_trans() before locking any inodesRobert Morris
2011-08-12log write() dataRobert Morris
usertest for big write()s push begin_trans/commit_trans down into syscalls
2011-01-11make new code like old codeRuss Cox
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-27copyout() copies data to a va in a pagetable, for exec() &cRobert Morris
usertest that passes too many arguments, break exec
2010-07-02Initial version of single-cpu xv6 with page tablesFrans Kaashoek
2009-08-30assorted fixes:Russ Cox
* rename c/cp to cpu/proc * rename cpu.context to cpu.scheduler * fix some comments * formatting for printout
2009-08-08shuffle and tweak for formatting.Russ Cox
pdf has very good page breaks now. would be a good copy for fall 2009.
2009-07-11rearrangements and cleanup for textRuss Cox
2009-05-31simplifyrsc
2008-10-17try harder to get directory refcounts rightkolya
2008-10-16make mkdir crash-safer, as noticed by many students on midtermkolya
2007-09-27believe it or not, this was workingrsc
the macro expansion of "char *cp;" turned into char *(curproc[cpu()]); which declares a dynamically sized array of char* called curproc. so then &cp == &(curproc[cpu()]) was actually a stack variable as "expected". it was one past the end of the array, but the implicit alloca allocated more than was necessary. do not tell me that making cp a #define was a bad idea. there are worse problems to fix. more on that later.
2007-08-28spaces around else for rtmrsc
2007-08-28more consistent spacingrsc
2007-08-28remove _ from pipe; be like filersc
2007-08-27make code match commentrsc
2007-08-27make code match commentrsc
2007-08-27delete unnecessary #include linesrsc
2007-08-27oopsrsc
2007-08-27nitsrsc
2007-08-27fileincref -> filedup (consistent with idup)rsc
2007-08-24shuffle for formattingrsc
2007-08-24remove unused variablersc
2007-08-24Remove struct uinode.rsc
Remove type arg to mknod (assume T_DEV).
2007-08-22PDF at http://am.lcs.mit.edu/~rsc/xv6.pdfrsc
Various changes made while offline. + bwrite sector argument is redundant; use b->sector. + reformatting of files for nicer PDF page breaks + distinguish between locked, unlocked inodes in type signatures + change FD_FILE to FD_INODE + move userinit (nee proc0init) to proc.c + move ROOTDEV to param.h + always parenthesize sizeof argument
2007-08-21ARGMAX -> MAXARGSrsc
2007-08-21Various cleanup:rsc
- 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-20checkpoint - simpler namei interfacersc
2007-08-10avoid assignments in declarationsrsc
2007-08-10Make cp a magic symbol.rsc
2007-08-09oopsrsc
2007-08-09try to use cp only for curproc[cpu()]rsc
2007-08-08save process name for debuggingrsc
2006-09-07fix ide, pit interfacesrsc
2006-09-07fix pipe bugrsc
2006-09-07refactor syscall codersc
2006-09-06wrap long linesrsc
2006-09-06fd_* => file_*rsc
2006-09-06fd.* -> file.*rsc
2006-09-06struct fd -> struct filersc
2006-09-06split syscall.c into sysfile.c and sysproc.crsc