Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
ee9c7f3b
Commit
ee9c7f3b
authored
18 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
goodbye PushRegs
parent
f15a3ae2
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
proc.c
+1
-1
1 addition, 1 deletion
proc.c
syscall.c
+2
-2
2 additions, 2 deletions
syscall.c
trap.c
+1
-1
1 addition, 1 deletion
trap.c
x86.h
+2
-5
2 additions, 5 deletions
x86.h
with
6 additions
and
9 deletions
proc.c
+
1
−
1
View file @
ee9c7f3b
...
...
@@ -104,7 +104,7 @@ copyproc(struct proc* p)
*
np
->
tf
=
*
p
->
tf
;
// Clear %eax so that fork system call returns 0 in child.
np
->
tf
->
regs
.
eax
=
0
;
np
->
tf
->
eax
=
0
;
// Set up new jmpbuf to start executing at forkret (see below).
memset
(
&
np
->
jmpbuf
,
0
,
sizeof
np
->
jmpbuf
);
...
...
This diff is collapsed.
Click to expand it.
syscall.c
+
2
−
2
View file @
ee9c7f3b
...
...
@@ -263,7 +263,7 @@ void
syscall
(
void
)
{
struct
proc
*
cp
=
curproc
[
cpu
()];
int
num
=
cp
->
tf
->
regs
.
eax
;
int
num
=
cp
->
tf
->
eax
;
int
ret
=
-
1
;
//cprintf("%x sys %d\n", cp, num);
...
...
@@ -309,5 +309,5 @@ syscall(void)
// XXX fault
break
;
}
cp
->
tf
->
regs
.
eax
=
ret
;
cp
->
tf
->
eax
=
ret
;
}
This diff is collapsed.
Click to expand it.
trap.c
+
1
−
1
View file @
ee9c7f3b
...
...
@@ -37,7 +37,7 @@ trap(struct Trapframe *tf)
if
(
v
==
T_SYSCALL
){
struct
proc
*
cp
=
curproc
[
cpu
()];
int
num
=
cp
->
tf
->
regs
.
eax
;
int
num
=
cp
->
tf
->
eax
;
if
(
cp
==
0
)
panic
(
"syscall with no proc"
);
if
(
cp
->
killed
)
...
...
This diff is collapsed.
Click to expand it.
x86.h
+
2
−
5
View file @
ee9c7f3b
...
...
@@ -339,7 +339,7 @@ sti(void)
__asm__
volatile
(
"sti"
);
}
struct
PushRegs
{
struct
Trapframe
{
/* registers as pushed by pusha */
uint32_t
edi
;
uint32_t
esi
;
...
...
@@ -349,10 +349,7 @@ struct PushRegs {
uint32_t
edx
;
uint32_t
ecx
;
uint32_t
eax
;
};
struct
Trapframe
{
struct
PushRegs
regs
;
/* rest of trap frame */
uint16_t
es
;
uint16_t
padding1
;
uint16_t
ds
;
...
...
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