Commit graph

97 commits

Author SHA1 Message Date
Austin Clements
9d59eb0151 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.
2012-02-17 23:20:13 -05:00
Frans Kaashoek
d10d324e79 Remove sys_init syscall
Invoke initlog from forkret on first user process
2011-08-22 20:05:15 -04:00
Robert Morris
2e59046362 log write() data
usertest for big write()s
push begin_trans/commit_trans down into syscalls
2011-08-12 09:25:39 -04:00
Frans Kaashoek
9aa0337dc1 Map kernel high
Very important to give qemu memory through PHYSTOP :(
2011-07-29 07:31:27 -04:00
Frans Kaashoek
13a96baefc Dirt simple logging
Passes usertests and stressfs
Seems to recover correctly in a number of simple cases
2011-07-27 20:35:46 -04:00
Russ Cox
c5f5387351 fixes from Peter Froehlich 2011-02-28 09:32:20 -05:00
Russ Cox
1a81e38b17 make new code like old code
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.
2011-01-11 13:01:13 -05:00
Austin Clements
b1d41d6788 Remove the stack guard page. Processes are now contiguous from 0 to 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-09-01 16:46:37 -04:00
Robert Morris
789b508d53 uptime() sys call for benchmarking
increase PHYSTOP
2010-08-11 14:34:45 -04:00
Frans Kaashoek
74c82bc158 nits 2010-07-02 17:45:37 -04:00
Frans Kaashoek
40889627ba Initial version of single-cpu xv6 with page tables 2010-07-02 14:51:53 -04:00
Russ Cox
48755214c9 assorted fixes:
* rename c/cp to cpu/proc
 * rename cpu.context to cpu.scheduler
 * fix some comments
 * formatting for printout
2009-08-30 23:02:08 -07:00
rsc
5516be1fed spaces around else for rtm 2007-08-28 18:37:41 +00:00
rsc
e4d6a21165 more consistent spacing 2007-08-28 18:32:08 +00:00
rsc
773159fbee make code match comment 2007-08-27 23:53:50 +00:00
rsc
3a2310f746 make code match comment 2007-08-27 23:53:17 +00:00
rsc
558ab49f13 delete unnecessary #include lines 2007-08-27 23:26:33 +00:00
rsc
efc12b8e61 Replace yield system call with sleep. 2007-08-27 13:34:35 +00:00
rsc
97ac612fb1 nits 2007-08-24 20:28:08 +00:00
rsc
4bcd0f6a77 Add yield system call, for zombie test program (bad idea?). 2007-08-24 20:04:53 +00:00
rtm
902b13f5d6 simplify ide queuing
nits in comments
2007-08-24 19:32:36 +00:00
rsc
f32f3638f4 Various cleanup:
- 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-21 19:22:08 +00:00
rsc
f1f8dd91bc formatting 2007-08-14 18:42:34 +00:00
rsc
b6095304b7 Make cp a magic symbol. 2007-08-10 16:37:27 +00:00
rsc
9583b476bf try to use cp only for curproc[cpu()] 2007-08-09 17:32:40 +00:00
rsc
453c6a65a2 convert syscall dispatch to table 2007-08-08 09:41:21 +00:00
rsc
224f6598c1 refactor syscall code 2006-09-07 14:13:26 +00:00
rsc
05a7bbe08b comment fixes 2006-09-07 13:07:52 +00:00
rsc
db8fb62e4d for vs while 2006-09-06 18:47:51 +00:00
rsc
9936bffa45 fd.* -> file.* 2006-09-06 18:40:28 +00:00
rsc
2685309fb4 split syscall.c into sysfile.c and sysproc.c 2006-09-06 18:19:11 +00:00
rsc
d4c64e5d43 writeable => writable 2006-09-06 18:06:04 +00:00
rsc
f552738889 no /* */ comments 2006-09-06 17:50:20 +00:00
rsc
9e9bcaf143 standardize various * conventions 2006-09-06 17:27:19 +00:00
rtm
2aa4c3bc29 complain if no disk 1
lots of cleanup
2006-08-30 18:55:06 +00:00
rtm
7a37578e9e clear killed flag in exit
idecref cwd in exit
2006-08-29 19:59:52 +00:00
rtm
dfcc5b997c prune unneeded panics and debug output 2006-08-29 19:06:37 +00:00
rtm
3b95801add i broke sbrk, fix it 2006-08-29 17:01:40 +00:00
rtm
2b19190c13 clean up stale error checks and panics
delete unused functions
a few comments
2006-08-29 14:45:45 +00:00
rtm
03c70cc2e6 consistently ignore more than 14 chars in path component
forbid create or write of existing directory
mkdir("d1/d2/d3"), .. should refer to d2, not cwd
mkdir increase parent link count
2006-08-26 16:31:05 +00:00
rtm
a6c28c9779 mkdir check error from mknod
chdir return -1 if target not a dir
2006-08-26 15:06:59 +00:00
rtm
5051da6de3 inode addrs[NDIRECT] -> NADDRS
fix race in mknod / creat
use last component in dirent in mknod, not path
2006-08-25 01:11:30 +00:00
kaashoek
ea2909b6b5 user-level malloc (untested)
nit in sbrk
indirect block
fix dup to share fd struct
2006-08-24 02:44:41 +00:00
kaashoek
8b58e81077 i/o redirection in sh
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?
2006-08-23 01:09:24 +00:00
kaashoek
f18ab5c04e compiling, but untested dup 2006-08-20 03:33:01 +00:00
kaashoek
16083d4462 removed block system call
renumber system calls (run gmake clean!)
skeleton for dup system call
2006-08-20 03:08:54 +00:00
kaashoek
8787cd01df chdir
cd in shell
nits in mkdir, ls, etc.
2006-08-19 23:41:34 +00:00
kaashoek
bdb6643303 set size for directories correctly in wdir and mkfs
mkdir
ls shows stat info for each dir entry
2006-08-14 14:13:52 +00:00
kaashoek
d15f0d1033 start on mkdir
stat
2006-08-14 03:00:13 +00:00
rtm
17e3cf15ba fix iget() bug that allocated in-use inode[] entries 2006-08-13 15:51:58 +00:00