Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
54f2da75
Commit
54f2da75
authored
Feb 16, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement 32-bit compatibility for waitid(2).
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
a19050f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
2 deletions
+51
-2
arch/mips/kernel/linux32.c
arch/mips/kernel/linux32.c
+22
-0
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
arch/mips/kernel/signal32.c
arch/mips/kernel/signal32.c
+27
-0
No files found.
arch/mips/kernel/linux32.c
View file @
54f2da75
...
...
@@ -221,6 +221,28 @@ sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr, int options)
return
compat_sys_wait4
(
pid
,
stat_addr
,
options
,
NULL
);
}
asmlinkage
long
sysn32_waitid
(
int
which
,
compat_pid_t
pid
,
siginfo_t
__user
*
uinfo
,
int
options
,
struct
compat_rusage
__user
*
uru
)
{
struct
rusage
ru
;
long
ret
;
mm_segment_t
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_waitid
(
which
,
pid
,
uinfo
,
options
,
uru
?
(
struct
rusage
__user
*
)
&
ru
:
NULL
);
set_fs
(
old_fs
);
if
(
ret
<
0
||
uinfo
->
si_signo
==
0
)
return
ret
;
if
(
uru
)
ret
=
put_compat_rusage
(
&
ru
,
uru
);
return
ret
;
}
struct
sysinfo32
{
s32
uptime
;
u32
loads
[
3
];
...
...
arch/mips/kernel/scall64-n32.S
View file @
54f2da75
...
...
@@ -358,7 +358,7 @@ EXPORT(sysn32_call_table)
PTR
compat_sys_mq_notify
PTR
compat_sys_mq_getsetattr
PTR
sys_ni_syscall
/*
6240
,
sys_vserver
*/
PTR
sys_waitid
PTR
sys
n32
_waitid
PTR
sys_ni_syscall
/*
available
,
was
setaltroot
*/
PTR
sys_add_key
PTR
sys_request_key
...
...
arch/mips/kernel/scall64-o32.S
View file @
54f2da75
...
...
@@ -480,7 +480,7 @@ sys_call_table:
PTR
compat_sys_mq_notify
/*
4275
*/
PTR
compat_sys_mq_getsetattr
PTR
sys_ni_syscall
/*
sys_vserver
*/
PTR
sys_waitid
PTR
sys
32
_waitid
PTR
sys_ni_syscall
/*
available
,
was
setaltroot
*/
PTR
sys_add_key
/*
4280
*/
PTR
sys_request_key
...
...
arch/mips/kernel/signal32.c
View file @
54f2da75
...
...
@@ -902,3 +902,30 @@ asmlinkage int sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t *uinfo)
set_fs
(
old_fs
);
return
ret
;
}
asmlinkage
long
sys32_waitid
(
int
which
,
compat_pid_t
pid
,
compat_siginfo_t
__user
*
uinfo
,
int
options
,
struct
compat_rusage
__user
*
uru
)
{
siginfo_t
info
;
struct
rusage
ru
;
long
ret
;
mm_segment_t
old_fs
=
get_fs
();
info
.
si_signo
=
0
;
set_fs
(
KERNEL_DS
);
ret
=
sys_waitid
(
which
,
pid
,
(
siginfo_t
__user
*
)
&
info
,
options
,
uru
?
(
struct
rusage
__user
*
)
&
ru
:
NULL
);
set_fs
(
old_fs
);
if
(
ret
<
0
||
info
.
si_signo
==
0
)
return
ret
;
if
(
uru
&&
(
ret
=
put_compat_rusage
(
&
ru
,
uru
)))
return
ret
;
BUG_ON
(
info
.
si_code
&
__SI_MASK
);
info
.
si_code
|=
__SI_CHLD
;
return
copy_siginfo_to_user32
(
uinfo
,
&
info
);
}
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