History log of /xv6-public/ulib.c (Results 1 – 24 of 24)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: xv6-rev11
# 308a3b88 31-Aug-2018 Frans Kaashoek <kaashoek@mit.edu>

thanks tyfkda


Revision tags: xv6-rev9
# 7894fcd2 25-Aug-2016 Frans Kaashoek <kaashoek@mit.edu>

Remove trailing white space with:
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done
(Thanks to Nicolás Wolovick)


Revision tags: xv6-rev8, xv6-rev7, osdi12-submit, xv6-rev6, xv6-rev5
# 1a81e38b 11-Jan-2011 Russ Cox <rsc@swtch.com>

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-p

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.

show more ...


Revision tags: xv6-2010, xv6-rev4, xv6-rev3
# 82201353 08-Mar-2009 rsc <rsc>

xv6: use stosb for memset


Revision tags: xv6-2008, xv6-2007, xv6-rev1
# 1b789e1d 24-Aug-2007 rsc <rsc>

Remove puts in favor of printf.
Allow multiple arguments to ls.


# eaea18cb 22-Aug-2007 rsc <rsc>

PDF at http://am.lcs.mit.edu/~rsc/xv6.pdf

Various changes made while offline.

+ bwrite sector argument is redundant; use b->sector.
+ reformatting of files for nicer PDF page breaks
+ distinguis

PDF at http://am.lcs.mit.edu/~rsc/xv6.pdf

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

show more ...


# dca5b5ca 10-Aug-2007 rsc <rsc>

avoid assignments in declarations


# 115e1774 08-Aug-2007 rsc <rsc>

standardize on not using unsigned keyword


# e204d0a1 08-Aug-2007 rsc <rsc>

atoi, for kill


# a059f025 08-Aug-2007 rsc <rsc>

change gets to return \n, to distinguish 0-byte read from empty line


Revision tags: symlinks, xv6-2006, xv6-rev0
# 48b82470 06-Sep-2006 rsc <rsc>

break single-line if statements


# 9e9bcaf1 06-Sep-2006 rsc <rsc>

standardize various * conventions


# a650c606 06-Sep-2006 rsc <rsc>

spacing fixes: no tabs, 2-space indents (for rtm)


# 8b58e810 23-Aug-2006 kaashoek <kaashoek>

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

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?

show more ...


# bdb66433 14-Aug-2006 kaashoek <kaashoek>

set size for directories correctly in wdir and mkfs
mkdir
ls shows stat info for each dir entry


# d15f0d10 14-Aug-2006 kaashoek <kaashoek>

start on mkdir
stat


# 43572072 12-Aug-2006 rtm <rtm>

fix getblk to actually lock the block
no more cons_put system calls
usertests tests two processes writing files


# 17a85657 11-Aug-2006 rtm <rtm>

init creates console, opens 0/1/2, runs sh
sh accepts 0-argument commands (like userfs)
reads from console


# b75c11b2 16-Jul-2006 rsc <rsc>

add %s to cprintf for cons_puts


# 9b37d1bf 16-Jul-2006 rsc <rsc>

Add user.h for prototypes.
Add cons_puts for cleaner output.


# 5ce9751c 11-Jul-2006 rsc <rsc>

Changes to allow use of native x86 ELF compilers, which on my
Linux 2.4 box using gcc 3.4.6 don't seem to follow the same
conventions as the i386-jos-elf-gcc compilers.
Can run make 'TOOLPREFIX=' or

Changes to allow use of native x86 ELF compilers, which on my
Linux 2.4 box using gcc 3.4.6 don't seem to follow the same
conventions as the i386-jos-elf-gcc compilers.
Can run make 'TOOLPREFIX=' or edit the Makefile.

curproc[cpu()] can now be NULL, indicating that no proc is running.
This seemed safer to me than having curproc[0] and curproc[1]
both pointing at proc[0] potentially.

The old implementation of swtch depended on the stack frame layout
used inside swtch being okay to return from on the other stack
(exactly the V6 you are not expected to understand this).
It also could be called in two contexts: at boot time, to schedule
the very first process, and later, on behalf of a process, to sleep
or schedule some other process.

I split this into two functions: scheduler and swtch.

The scheduler is now a separate never-returning function, invoked
by each cpu once set up. The scheduler looks like:

scheduler() {
setjmp(cpu.context);

pick proc to schedule
blah blah blah

longjmp(proc.context)
}

The new swtch is intended to be called only when curproc[cpu()] is not NULL,
that is, only on behalf of a user proc. It does:

swtch() {
if(setjmp(proc.context) == 0)
longjmp(cpu.context)
}

to save the current proc context and then jump over to the scheduler,
running on the cpu stack.

Similarly the system call stubs are now in assembly in usys.S to avoid
needing to know the details of stack frame layout used by the compiler.

Also various changes in the debugging prints.

show more ...


# 7837c71b 06-Jul-2006 kaashoek <kaashoek>

disable all interrupts when acquiring lock
user program that makes a blocking system call


# 8b4e2a08 01-Jul-2006 rtm <rtm>

swtch saves callee-saved registers
swtch idles on per-CPU stack, not on calling process's stack
fix pipe bugs
usertest.c tests pipes, fork, exit, close


# c41f1de5 27-Jun-2006 rtm <rtm>

file descriptors
pipes