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
b6e203d8
Commit
b6e203d8
authored
Feb 16, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use generic compat_sys_wait4 to implement 32-bit wait4(2).
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
a4f23e3d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
74 deletions
+3
-74
arch/mips/kernel/linux32.c
arch/mips/kernel/linux32.c
+1
-72
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-n32.S
+1
-1
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/scall64-o32.S
+1
-1
No files found.
arch/mips/kernel/linux32.c
View file @
b6e203d8
...
...
@@ -215,81 +215,10 @@ sys32_readdir(unsigned int fd, void * dirent32, unsigned int count)
return
(
n
);
}
struct
rusage32
{
struct
compat_timeval
ru_utime
;
struct
compat_timeval
ru_stime
;
int
ru_maxrss
;
int
ru_ixrss
;
int
ru_idrss
;
int
ru_isrss
;
int
ru_minflt
;
int
ru_majflt
;
int
ru_nswap
;
int
ru_inblock
;
int
ru_oublock
;
int
ru_msgsnd
;
int
ru_msgrcv
;
int
ru_nsignals
;
int
ru_nvcsw
;
int
ru_nivcsw
;
};
static
int
put_rusage
(
struct
rusage32
*
ru
,
struct
rusage
*
r
)
{
int
err
;
if
(
!
access_ok
(
VERIFY_WRITE
,
ru
,
sizeof
*
ru
))
return
-
EFAULT
;
err
=
__put_user
(
r
->
ru_utime
.
tv_sec
,
&
ru
->
ru_utime
.
tv_sec
);
err
|=
__put_user
(
r
->
ru_utime
.
tv_usec
,
&
ru
->
ru_utime
.
tv_usec
);
err
|=
__put_user
(
r
->
ru_stime
.
tv_sec
,
&
ru
->
ru_stime
.
tv_sec
);
err
|=
__put_user
(
r
->
ru_stime
.
tv_usec
,
&
ru
->
ru_stime
.
tv_usec
);
err
|=
__put_user
(
r
->
ru_maxrss
,
&
ru
->
ru_maxrss
);
err
|=
__put_user
(
r
->
ru_ixrss
,
&
ru
->
ru_ixrss
);
err
|=
__put_user
(
r
->
ru_idrss
,
&
ru
->
ru_idrss
);
err
|=
__put_user
(
r
->
ru_isrss
,
&
ru
->
ru_isrss
);
err
|=
__put_user
(
r
->
ru_minflt
,
&
ru
->
ru_minflt
);
err
|=
__put_user
(
r
->
ru_majflt
,
&
ru
->
ru_majflt
);
err
|=
__put_user
(
r
->
ru_nswap
,
&
ru
->
ru_nswap
);
err
|=
__put_user
(
r
->
ru_inblock
,
&
ru
->
ru_inblock
);
err
|=
__put_user
(
r
->
ru_oublock
,
&
ru
->
ru_oublock
);
err
|=
__put_user
(
r
->
ru_msgsnd
,
&
ru
->
ru_msgsnd
);
err
|=
__put_user
(
r
->
ru_msgrcv
,
&
ru
->
ru_msgrcv
);
err
|=
__put_user
(
r
->
ru_nsignals
,
&
ru
->
ru_nsignals
);
err
|=
__put_user
(
r
->
ru_nvcsw
,
&
ru
->
ru_nvcsw
);
err
|=
__put_user
(
r
->
ru_nivcsw
,
&
ru
->
ru_nivcsw
);
return
err
;
}
asmlinkage
int
sys32_wait4
(
compat_pid_t
pid
,
unsigned
int
*
stat_addr
,
int
options
,
struct
rusage32
*
ru
)
{
if
(
!
ru
)
return
sys_wait4
(
pid
,
stat_addr
,
options
,
NULL
);
else
{
struct
rusage
r
;
int
ret
;
unsigned
int
status
;
mm_segment_t
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_wait4
(
pid
,
stat_addr
?
&
status
:
NULL
,
options
,
&
r
);
set_fs
(
old_fs
);
if
(
put_rusage
(
ru
,
&
r
))
return
-
EFAULT
;
if
(
stat_addr
&&
put_user
(
status
,
stat_addr
))
return
-
EFAULT
;
return
ret
;
}
}
asmlinkage
int
sys32_waitpid
(
compat_pid_t
pid
,
unsigned
int
*
stat_addr
,
int
options
)
{
return
sys32
_wait4
(
pid
,
stat_addr
,
options
,
NULL
);
return
compat_sys
_wait4
(
pid
,
stat_addr
,
options
,
NULL
);
}
struct
sysinfo32
{
...
...
arch/mips/kernel/scall64-n32.S
View file @
b6e203d8
...
...
@@ -176,7 +176,7 @@ EXPORT(sysn32_call_table)
PTR
sys_fork
PTR
sys32_execve
PTR
sys_exit
PTR
sys32
_wait4
PTR
compat_sys
_wait4
PTR
sys_kill
/*
6060
*/
PTR
sys32_newuname
PTR
sys_semget
...
...
arch/mips/kernel/scall64-o32.S
View file @
b6e203d8
...
...
@@ -316,7 +316,7 @@ sys_call_table:
PTR
sys_vhangup
PTR
sys_ni_syscall
/*
was
sys_idle
*/
PTR
sys_ni_syscall
/*
sys_vm86
*/
PTR
sys32
_wait4
PTR
compat_sys
_wait4
PTR
sys_swapoff
/*
4115
*/
PTR
sys32_sysinfo
PTR
sys32_ipc
...
...
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