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
9d3fbb5d
Commit
9d3fbb5d
authored
May 27, 2003
by
Miles Bader
Committed by
Arnaldo Carvalho de Melo
May 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Handle new do_fork return value on v850
parent
50a94e1a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
arch/v850/kernel/entry.S
arch/v850/kernel/entry.S
+22
-13
arch/v850/kernel/process.c
arch/v850/kernel/process.c
+0
-8
No files found.
arch/v850/kernel/entry.S
View file @
9d3fbb5d
...
...
@@ -557,7 +557,10 @@ L_ENTRY(sys_fork_wrapper):
addi
SIGCHLD
,
r0
,
r6
//
Arg
0
:
flags
ld.w
PTO
+
PT_GPR
(
GPR_SP
)[
sp
],
r7
//
Arg
1
:
child
SP
(
use
parent
's)
movea
PTO
,
sp
,
r8
//
Arg
2
:
parent
context
mov
hilo
(
CSYM
(
fork_common
)),
r18
//
Where
the
real
work
gets
done
mov
r0
,
r9
//
Arg
3
/
4
/
5
:
0
st.w
r0
,
16
[
sp
]
st.w
r0
,
20
[
sp
]
mov
hilo
(
CSYM
(
do_fork
)),
r18
//
Where
the
real
work
gets
done
br
save_extra_state_tramp
//
Save
state
and
go
there
#else
//
fork
almost
works
,
enough
to
trick
you
into
looking
elsewhere
:
-(
...
...
@@ -570,16 +573,22 @@ L_ENTRY(sys_vfork_wrapper):
addi
CLONE_VFORK
| CLONE_VM |
SIGCHLD
,
r0
,
r6
//
Arg
0
:
flags
ld.w
PTO
+
PT_GPR
(
GPR_SP
)[
sp
],
r7
//
Arg
1
:
child
SP
(
use
parent
's)
movea
PTO
,
sp
,
r8
//
Arg
2
:
parent
context
mov
hilo
(
CSYM
(
fork_common
)),
r18
//
Where
the
real
work
gets
done
mov
r0
,
r9
//
Arg
3
/
4
/
5
:
0
st.w
r0
,
16
[
sp
]
st.w
r0
,
20
[
sp
]
mov
hilo
(
CSYM
(
do_fork
)),
r18
//
Where
the
real
work
gets
done
br
save_extra_state_tramp
//
Save
state
and
go
there
END
(
sys_vfork_wrapper
)
L_ENTRY
(
sys_clone_wrapper
):
ld.w
PTO
+
PT_GPR
(
GPR_SP
)[
sp
],
r19
//
parent
's stack pointer
ld.w
PTO
+
PT_GPR
(
GPR_SP
)[
sp
],
r19
//
parent
's stack pointer
cmp
r7
,
r0
//
See
if
child
SP
arg
(
arg
1
)
is
0
.
cmov
z
,
r19
,
r7
,
r7
//
...
and
use
the
parent
's if so.
movea
PTO
,
sp
,
r8
//
Arg
2
:
parent
context
mov
hilo
(
CSYM
(
fork_common
)),
r18
//
Where
the
real
work
gets
done
mov
r0
,
r9
//
Arg
3
/
4
/
5
:
0
st.w
r0
,
16
[
sp
]
st.w
r0
,
20
[
sp
]
mov
hilo
(
CSYM
(
do_fork
)),
r18
//
Where
the
real
work
gets
done
br
save_extra_state_tramp
//
Save
state
and
go
there
END
(
sys_clone_wrapper
)
...
...
arch/v850/kernel/process.c
View file @
9d3fbb5d
...
...
@@ -200,14 +200,6 @@ int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs)
return
error
;
}
/* This is the common part of the various fork-like system calls (which
are in entry.S). */
int
fork_common
(
int
flags
,
unsigned
long
new_sp
,
struct
pt_regs
*
regs
)
{
struct
task_struct
*
p
=
do_fork
(
flags
,
new_sp
,
regs
,
0
,
0
,
0
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
/*
* These bracket the sleeping functions..
...
...
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