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
bc8221a5
Commit
bc8221a5
authored
8 years ago
by
Robert Morris
Browse files
Options
Downloads
Patches
Plain Diff
comment about sched() saving/restoring cpu->intena
parent
4b2152cc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
proc.c
+6
-1
6 additions, 1 deletion
proc.c
spinlock.c
+2
-1
2 additions, 1 deletion
spinlock.c
with
8 additions
and
2 deletions
proc.c
+
6
−
1
View file @
bc8221a5
...
@@ -302,7 +302,12 @@ scheduler(void)
...
@@ -302,7 +302,12 @@ scheduler(void)
}
}
// Enter scheduler. Must hold only ptable.lock
// Enter scheduler. Must hold only ptable.lock
// and have changed proc->state.
// and have changed proc->state. Saves and restores
// intena because intena is a property of this
// kernel thread, not this CPU. It should
// be proc->intena and proc->ncli, but that would
// break in the few places where a lock is held but
// there's no process.
void
void
sched
(
void
)
sched
(
void
)
{
{
...
...
This diff is collapsed.
Click to expand it.
spinlock.c
+
2
−
1
View file @
bc8221a5
...
@@ -102,8 +102,9 @@ pushcli(void)
...
@@ -102,8 +102,9 @@ pushcli(void)
eflags
=
readeflags
();
eflags
=
readeflags
();
cli
();
cli
();
if
(
cpu
->
ncli
++
==
0
)
if
(
cpu
->
ncli
==
0
)
cpu
->
intena
=
eflags
&
FL_IF
;
cpu
->
intena
=
eflags
&
FL_IF
;
cpu
->
ncli
+=
1
;
}
}
void
void
...
...
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