Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
adc4bc97
Commit
adc4bc97
authored
Mar 06, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Well, duh!
Initialize preempt count outside the spinlocks that can themselves impact it on SMP.
parent
a925c40f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
kernel/sched.c
kernel/sched.c
+3
-1
No files found.
kernel/sched.c
View file @
adc4bc97
...
@@ -1438,10 +1438,12 @@ void __init init_idle(task_t *idle, int cpu)
...
@@ -1438,10 +1438,12 @@ void __init init_idle(task_t *idle, int cpu)
idle
->
prio
=
MAX_PRIO
;
idle
->
prio
=
MAX_PRIO
;
idle
->
state
=
TASK_RUNNING
;
idle
->
state
=
TASK_RUNNING
;
idle
->
thread_info
->
cpu
=
cpu
;
idle
->
thread_info
->
cpu
=
cpu
;
idle
->
thread_info
->
preempt_count
=
(
idle
->
lock_depth
>=
0
);
double_rq_unlock
(
idle_rq
,
rq
);
double_rq_unlock
(
idle_rq
,
rq
);
set_tsk_need_resched
(
idle
);
set_tsk_need_resched
(
idle
);
__restore_flags
(
flags
);
__restore_flags
(
flags
);
/* Set the preempt count _outside_ the spinlocks! */
idle
->
thread_info
->
preempt_count
=
(
idle
->
lock_depth
>=
0
);
}
}
extern
void
init_timervecs
(
void
);
extern
void
init_timervecs
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment