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
nexedi
linux
Commits
aeffbd1b
Commit
aeffbd1b
authored
Feb 23, 2003
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: Make switch_to return the previous task in the `last' argument
parent
5a983302
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
arch/ppc/kernel/process.c
arch/ppc/kernel/process.c
+5
-2
include/asm-ppc/system.h
include/asm-ppc/system.h
+3
-2
No files found.
arch/ppc/kernel/process.c
View file @
aeffbd1b
...
@@ -197,10 +197,12 @@ dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
...
@@ -197,10 +197,12 @@ dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
return
1
;
return
1
;
}
}
void
__switch_to
(
struct
task_struct
*
prev
,
struct
task_struct
*
new
)
struct
task_struct
*
__switch_to
(
struct
task_struct
*
prev
,
struct
task_struct
*
new
)
{
{
struct
thread_struct
*
new_thread
,
*
old_thread
;
struct
thread_struct
*
new_thread
,
*
old_thread
;
unsigned
long
s
;
unsigned
long
s
;
struct
task_struct
*
last
;
local_irq_save
(
s
);
local_irq_save
(
s
);
#if CHECK_STACK
#if CHECK_STACK
...
@@ -244,8 +246,9 @@ void __switch_to(struct task_struct *prev, struct task_struct *new)
...
@@ -244,8 +246,9 @@ void __switch_to(struct task_struct *prev, struct task_struct *new)
new
->
thread
.
regs
->
msr
|=
MSR_VEC
;
new
->
thread
.
regs
->
msr
|=
MSR_VEC
;
new_thread
=
&
new
->
thread
;
new_thread
=
&
new
->
thread
;
old_thread
=
&
current
->
thread
;
old_thread
=
&
current
->
thread
;
_switch
(
old_thread
,
new_thread
);
last
=
_switch
(
old_thread
,
new_thread
);
local_irq_restore
(
s
);
local_irq_restore
(
s
);
return
last
;
}
}
void
show_regs
(
struct
pt_regs
*
regs
)
void
show_regs
(
struct
pt_regs
*
regs
)
...
...
include/asm-ppc/system.h
View file @
aeffbd1b
...
@@ -86,8 +86,9 @@ struct device_node;
...
@@ -86,8 +86,9 @@ struct device_node;
extern
void
note_scsi_host
(
struct
device_node
*
,
void
*
);
extern
void
note_scsi_host
(
struct
device_node
*
,
void
*
);
struct
task_struct
;
struct
task_struct
;
extern
void
__switch_to
(
struct
task_struct
*
,
struct
task_struct
*
);
extern
struct
task_struct
*
__switch_to
(
struct
task_struct
*
,
#define switch_to(prev, next, last) __switch_to((prev), (next))
struct
task_struct
*
);
#define switch_to(prev, next, last) ((last) = __switch_to((prev), (next)))
struct
thread_struct
;
struct
thread_struct
;
extern
struct
task_struct
*
_switch
(
struct
thread_struct
*
prev
,
extern
struct
task_struct
*
_switch
(
struct
thread_struct
*
prev
,
...
...
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