Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krishna Vinnakota
CSEP551
Commits
f1f8dd91
Commit
f1f8dd91
authored
17 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
formatting
parent
29ff8d49
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
pipe.c
+2
-1
2 additions, 1 deletion
pipe.c
runoff
+43
-0
43 additions, 0 deletions
runoff
runoff.spec
+11
-0
11 additions, 0 deletions
runoff.spec
show1
+3
-0
3 additions, 0 deletions
show1
syscall.c
+1
-0
1 addition, 0 deletions
syscall.c
trap.c
+3
-3
3 additions, 3 deletions
trap.c
with
63 additions
and
4 deletions
pipe.c
+
2
−
1
View file @
f1f8dd91
...
...
@@ -45,6 +45,7 @@ pipe_alloc(struct file **f0, struct file **f1)
(
*
f1
)
->
writable
=
1
;
(
*
f1
)
->
pipe
=
p
;
return
0
;
oops:
if
(
p
)
kfree
((
char
*
)
p
,
PAGE
);
...
...
@@ -78,6 +79,7 @@ pipe_close(struct pipe *p, int writable)
kfree
((
char
*
)
p
,
PAGE
);
}
//PAGEBREAK: 20
int
pipe_write
(
struct
pipe
*
p
,
char
*
addr
,
int
n
)
{
...
...
@@ -117,7 +119,6 @@ pipe_read(struct pipe *p, char *addr, int n)
}
sleep
(
&
p
->
readp
,
&
p
->
lock
);
}
for
(
i
=
0
;
i
<
n
;
i
++
){
if
(
p
->
readp
==
p
->
writep
)
break
;
...
...
This diff is collapsed.
Click to expand it.
runoff
+
43
−
0
View file @
f1f8dd91
...
...
@@ -35,6 +35,7 @@ pr -e8 -t runoff.list | awk '
close(f)
n=$1
printf("%02d %s\n", n/100, s);
printf("TOC: %04d %s\n", n, s) >"fmt/tocdata"
next
}
{
...
...
@@ -42,6 +43,48 @@ pr -e8 -t runoff.list | awk '
}'
|
pr
-3
-t
>>
fmt
/toc
cat
toc.ftr
>>
fmt
/toc
# check for bad alignments
perl
-e
'
while(<>){
chomp;
s!#.*!!;
s!\s+! !g;
s! +$!!;
next if /^$/;
if(/TOC: (\d+) (.*)/){
$toc{$2} = $1;
next;
}
if(/even: (.*)/){
$file = $1;
if(!defined($toc{$file})){
print STDERR "Have no toc for $file\n";
next;
}
if($toc{$file} =~ /^\d\d[^0]/){
print STDERR "$file does not start on a fresh page.\n";
}
next;
}
if(/odd: (.*)/){
$file = $1;
if(!defined($toc{$file})){
print STDERR "Have no toc for $file\n";
next;
}
if($toc{$file} =~ /^\d\d[^5]/){
print STDERR "$file does not start on a second half page.\n";
}
next;
}
print STDERR "Unknown spec: $_\n";
}
'
fmt
/tocdata runoff.spec
# make definition list
cd fmt
perl
-e
'
...
...
This diff is collapsed.
Click to expand it.
runoff.spec
0 → 100644
+
11
−
0
View file @
f1f8dd91
even: mmu.h
even: bootasm.S
even: bootother.S
even: bootmain.c
even: main.c
even: spinlock.c
even: proc.h
even: proc.c
odd: kalloc.c
even: trap.c
odd: bio.c
This diff is collapsed.
Click to expand it.
show1
0 → 100755
+
3
−
0
View file @
f1f8dd91
#!/bin/sh
runoff1
"
$@
"
| pr.pl
-h
"xv6/
$@
"
| mpage
-m50t50b
-o
-bLetter
-T
-t
-2
-FCourier
-L60
>
x.ps
;
gv
--swap
x.ps
This diff is collapsed.
Click to expand it.
syscall.c
+
1
−
0
View file @
f1f8dd91
...
...
@@ -98,6 +98,7 @@ extern int sys_kill(void);
extern
int
sys_link
(
void
);
extern
int
sys_mkdir
(
void
);
extern
int
sys_mknod
(
void
);
//PAGEBREAK: 0
extern
int
sys_open
(
void
);
extern
int
sys_pipe
(
void
);
extern
int
sys_read
(
void
);
...
...
This diff is collapsed.
Click to expand it.
trap.c
+
3
−
3
View file @
f1f8dd91
...
...
@@ -40,11 +40,11 @@ trap(struct trapframe *tf)
return
;
}
// PAGEBREAK: 10
// Increment nlock to make sure interrupts stay off
// during interrupt handler. Decrement before returning.
cpus
[
cpu
()].
nlock
++
;
// PAGEBREAK: 10
switch
(
tf
->
trapno
){
case
IRQ_OFFSET
+
IRQ_TIMER
:
lapic_timerintr
();
...
...
@@ -80,8 +80,8 @@ trap(struct trapframe *tf)
default:
if
(
cp
)
{
// Assume process divided by zero or dereferenced null, etc.
cprintf
(
"pid %d %s: unhandled trap %d on cpu %d eip %x -- kill proc
\n
"
,
cp
->
pid
,
cp
->
name
,
tf
->
trapno
,
cpu
(),
tf
->
eip
);
cprintf
(
"pid %d %s: unhandled trap %d
err %d
on cpu %d eip %x -- kill proc
\n
"
,
cp
->
pid
,
cp
->
name
,
tf
->
trapno
,
tf
->
err
,
cpu
(),
tf
->
eip
);
proc_exit
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment