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
Kirill Smelkov
linux
Commits
e61a2502
Commit
e61a2502
authored
May 14, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lift getrusage() from wait_noreap_copyout()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
67d7ddde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
kernel/exit.c
kernel/exit.c
+6
-7
No files found.
kernel/exit.c
View file @
e61a2502
...
...
@@ -1062,9 +1062,6 @@ static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
{
struct
waitid_info
*
infop
;
if
(
wo
->
wo_rusage
)
getrusage
(
p
,
RUSAGE_BOTH
,
wo
->
wo_rusage
);
put_task_struct
(
p
);
infop
=
wo
->
wo_info
;
if
(
infop
)
{
...
...
@@ -1099,6 +1096,8 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
get_task_struct
(
p
);
read_unlock
(
&
tasklist_lock
);
sched_annotate_sleep
();
if
(
wo
->
wo_rusage
)
getrusage
(
p
,
RUSAGE_BOTH
,
wo
->
wo_rusage
);
if
((
exit_code
&
0x7f
)
==
0
)
{
why
=
CLD_EXITED
;
...
...
@@ -1296,12 +1295,12 @@ static int wait_task_stopped(struct wait_opts *wo,
why
=
ptrace
?
CLD_TRAPPED
:
CLD_STOPPED
;
read_unlock
(
&
tasklist_lock
);
sched_annotate_sleep
();
if
(
wo
->
wo_rusage
)
getrusage
(
p
,
RUSAGE_BOTH
,
wo
->
wo_rusage
);
if
(
unlikely
(
wo
->
wo_flags
&
WNOWAIT
))
return
wait_noreap_copyout
(
wo
,
p
,
pid
,
uid
,
why
,
exit_code
);
if
(
wo
->
wo_rusage
)
getrusage
(
p
,
RUSAGE_BOTH
,
wo
->
wo_rusage
);
wo
->
wo_stat
=
(
exit_code
<<
8
)
|
0x7f
;
infop
=
wo
->
wo_info
;
...
...
@@ -1350,10 +1349,10 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
get_task_struct
(
p
);
read_unlock
(
&
tasklist_lock
);
sched_annotate_sleep
();
if
(
wo
->
wo_rusage
)
getrusage
(
p
,
RUSAGE_BOTH
,
wo
->
wo_rusage
);
if
(
!
wo
->
wo_info
)
{
if
(
wo
->
wo_rusage
)
getrusage
(
p
,
RUSAGE_BOTH
,
wo
->
wo_rusage
);
put_task_struct
(
p
);
wo
->
wo_stat
=
0xffff
;
retval
=
pid
;
...
...
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