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
1ea2a016
Commit
1ea2a016
authored
Oct 21, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mn10300: switch to generic fork/vfork/clone
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
3416e809
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
28 deletions
+8
-28
arch/mn10300/include/asm/unistd.h
arch/mn10300/include/asm/unistd.h
+3
-0
arch/mn10300/kernel/process.c
arch/mn10300/kernel/process.c
+5
-28
No files found.
arch/mn10300/include/asm/unistd.h
View file @
1ea2a016
...
@@ -44,6 +44,9 @@
...
@@ -44,6 +44,9 @@
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_SYS_FORK
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/*
/*
* "Conditional" syscalls
* "Conditional" syscalls
...
...
arch/mn10300/kernel/process.c
View file @
1ea2a016
...
@@ -206,7 +206,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
...
@@ -206,7 +206,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
*/
*/
int
copy_thread
(
unsigned
long
clone_flags
,
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
c_usp
,
unsigned
long
ustk_size
,
unsigned
long
c_usp
,
unsigned
long
ustk_size
,
struct
task_struct
*
p
,
struct
pt_regs
*
kregs
)
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
{
{
struct
thread_info
*
ti
=
task_thread_info
(
p
);
struct
thread_info
*
ti
=
task_thread_info
(
p
);
struct
pt_regs
*
c_regs
;
struct
pt_regs
*
c_regs
;
...
@@ -227,7 +227,7 @@ int copy_thread(unsigned long clone_flags,
...
@@ -227,7 +227,7 @@ int copy_thread(unsigned long clone_flags,
p
->
thread
.
wchan
=
p
->
thread
.
pc
;
p
->
thread
.
wchan
=
p
->
thread
.
pc
;
p
->
thread
.
usp
=
c_usp
;
p
->
thread
.
usp
=
c_usp
;
if
(
unlikely
(
!
kregs
))
{
if
(
unlikely
(
p
->
flags
&
PF_KTHREAD
))
{
memset
(
c_regs
,
0
,
sizeof
(
struct
pt_regs
));
memset
(
c_regs
,
0
,
sizeof
(
struct
pt_regs
));
c_regs
->
a0
=
c_usp
;
/* function */
c_regs
->
a0
=
c_usp
;
/* function */
c_regs
->
d0
=
ustk_size
;
/* argument */
c_regs
->
d0
=
ustk_size
;
/* argument */
...
@@ -236,7 +236,8 @@ int copy_thread(unsigned long clone_flags,
...
@@ -236,7 +236,8 @@ int copy_thread(unsigned long clone_flags,
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_kernel_thread
;
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_kernel_thread
;
return
0
;
return
0
;
}
}
*
c_regs
=
*
kregs
;
*
c_regs
=
*
current_pt_regs
();
if
(
c_usp
)
c_regs
->
sp
=
c_usp
;
c_regs
->
sp
=
c_usp
;
c_regs
->
epsw
&=
~
EPSW_FE
;
/* my FPU */
c_regs
->
epsw
&=
~
EPSW_FE
;
/* my FPU */
...
@@ -249,30 +250,6 @@ int copy_thread(unsigned long clone_flags,
...
@@ -249,30 +250,6 @@ int copy_thread(unsigned long clone_flags,
return
0
;
return
0
;
}
}
/*
* clone a process
* - tlsptr is retrieved by copy_thread() from current_frame()->d3
*/
asmlinkage
long
sys_clone
(
unsigned
long
clone_flags
,
unsigned
long
newsp
,
int
__user
*
parent_tidptr
,
int
__user
*
child_tidptr
,
int
__user
*
tlsptr
)
{
return
do_fork
(
clone_flags
,
newsp
?:
current_frame
()
->
sp
,
current_frame
(),
0
,
parent_tidptr
,
child_tidptr
);
}
asmlinkage
long
sys_fork
(
void
)
{
return
do_fork
(
SIGCHLD
,
current_frame
()
->
sp
,
current_frame
(),
0
,
NULL
,
NULL
);
}
asmlinkage
long
sys_vfork
(
void
)
{
return
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
current_frame
()
->
sp
,
current_frame
(),
0
,
NULL
,
NULL
);
}
unsigned
long
get_wchan
(
struct
task_struct
*
p
)
unsigned
long
get_wchan
(
struct
task_struct
*
p
)
{
{
return
p
->
thread
.
wchan
;
return
p
->
thread
.
wchan
;
...
...
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