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
74c82bc1
Commit
74c82bc1
authored
14 years ago
by
Frans Kaashoek
Browse files
Options
Downloads
Patches
Plain Diff
nits
parent
40889627
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defs.h
+3
-2
3 additions, 2 deletions
defs.h
kalloc.c
+0
-10
0 additions, 10 deletions
kalloc.c
spinlock.c
+1
-1
1 addition, 1 deletion
spinlock.c
syscall.c
+2
-4
2 additions, 4 deletions
syscall.c
with
6 additions
and
17 deletions
defs.h
+
3
−
2
View file @
74c82bc1
...
...
@@ -155,8 +155,10 @@ void uartputc(int);
// vm.c
#define PGROUNDUP(sz) ((sz+PGSIZE-1) & ~(PGSIZE-1))
void
pminit
(
void
);
void
swkstack
(
void
);
void
ksegment
(
void
);
void
vminit
(
void
);
void
jkstack
();
void
printstack
(
void
);
void
printpgdir
(
uint
*
);
uint
*
setupkvm
(
void
);
// XXX need pde_t*
char
*
uva2ka
(
uint
*
,
char
*
);
...
...
@@ -165,7 +167,6 @@ void freevm(uint*);
void
inituvm
(
uint
*
,
char
*
,
char
*
,
uint
);
int
loaduvm
(
uint
*
,
char
*
,
struct
inode
*
ip
,
uint
,
uint
);
uint
*
copyuvm
(
uint
*
,
uint
);
void
ksegment
(
void
);
void
loadvm
(
struct
proc
*
);
// number of elements in fixed-size array
...
...
This diff is collapsed.
Click to expand it.
kalloc.c
+
0
−
10
View file @
74c82bc1
...
...
@@ -23,16 +23,6 @@ struct {
int
nfreemem
;
static
void
printfreelist
(
void
)
{
struct
run
*
r
,
**
rp
;
cprintf
(
"freelist:
\n
"
);
for
(
rp
=&
kmem
.
freelist
;
(
r
=*
rp
)
!=
0
;
rp
=&
r
->
next
){
cprintf
(
"0x%x %d=0x%x
\n
"
,
r
,
r
->
len
,
r
->
len
);
}
}
// Initialize free list of physical pages.
// This code cheats by just considering one megabyte of
// pages after end. Real systems would determine the
...
...
This diff is collapsed.
Click to expand it.
spinlock.c
+
1
−
1
View file @
74c82bc1
...
...
@@ -71,7 +71,7 @@ getcallerpcs(void *v, uint pcs[])
ebp
=
(
uint
*
)
v
-
2
;
for
(
i
=
0
;
i
<
10
;
i
++
){
if
(
ebp
==
0
||
ebp
<
0x100000
||
ebp
==
(
uint
*
)
0xffffffff
)
if
(
ebp
==
0
||
ebp
<
(
uint
*
)
0x100000
||
ebp
==
(
uint
*
)
0xffffffff
)
break
;
pcs
[
i
]
=
ebp
[
1
];
// saved %eip
ebp
=
(
uint
*
)
ebp
[
0
];
// saved %ebp
...
...
This diff is collapsed.
Click to expand it.
syscall.c
+
2
−
4
View file @
74c82bc1
...
...
@@ -34,10 +34,8 @@ fetchstr(struct proc *p, uint addr, char **pp)
if
(
addr
>=
p
->
sz
)
return
-
1
;
// *pp = p->mem + addr;
// ep = p->mem + p->sz;
*
pp
=
(
char
**
)
addr
;
ep
=
p
->
sz
;
*
pp
=
(
char
*
)
addr
;
ep
=
(
char
*
)
p
->
sz
;
for
(
s
=
*
pp
;
s
<
ep
;
s
++
)
if
(
*
s
==
0
)
return
s
-
*
pp
;
...
...
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