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
fbaa7b42
Commit
fbaa7b42
authored
17 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
various comment and print tweaks
parent
56c1a151
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
trap.c
+7
-6
7 additions, 6 deletions
trap.c
with
7 additions
and
6 deletions
trap.c
+
7
−
6
View file @
fbaa7b42
...
...
@@ -44,8 +44,7 @@ trap(struct trapframe *tf)
return
;
}
// Increment nlock to make sure interrupts stay off
// during interrupt handler. Decrement before returning.
// Make sure interrupts stay off during handler.
cpus
[
cpu
()].
nlock
++
;
switch
(
tf
->
trapno
){
...
...
@@ -67,22 +66,24 @@ trap(struct trapframe *tf)
lapic_eoi
();
break
;
case
IRQ_OFFSET
+
IRQ_SPURIOUS
:
cprintf
(
"spurious interrupt from cpu %d eip %x
\n
"
,
cpu
(),
tf
->
eip
);
cprintf
(
"cpu%d: spurious interrupt at %x:%x
\n
"
,
cpu
(),
tf
->
cs
,
tf
->
eip
);
lapic_eoi
();
break
;
default:
if
(
cp
==
0
||
(
tf
->
cs
&
3
)
==
0
){
//
Otherwise it's
our mistake.
if
(
cp
==
0
||
(
tf
->
cs
&
3
)
==
0
){
//
In kernel, it must be
our mistake.
cprintf
(
"unexpected trap %d from cpu %d eip %x
\n
"
,
tf
->
trapno
,
cpu
(),
tf
->
eip
);
panic
(
"trap"
);
}
//
Assume process divided by zero or dereferenced null, etc
.
//
In user space, assume process misbehaved
.
cprintf
(
"pid %d %s: trap %d err %d on cpu %d eip %x -- kill proc
\n
"
,
cp
->
pid
,
cp
->
name
,
tf
->
trapno
,
tf
->
err
,
cpu
(),
tf
->
eip
);
cp
->
killed
=
1
;
}
cpus
[
cpu
()].
nlock
--
;
// Force process exit if it has been killed and is in user space.
...
...
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