Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
5eb468bc
Commit
5eb468bc
authored
Feb 18, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Thread/Util: make SCHED_RESET_ON_FORK optional
Use it if it exists, but don't insist if the C library is poor (e.g. Bionic/Android).
parent
7f8dd0e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Util.hxx
src/thread/Util.hxx
+7
-1
No files found.
src/thread/Util.hxx
View file @
5eb468bc
...
...
@@ -78,7 +78,13 @@ SetThreadRealtime()
#ifdef __linux__
struct
sched_param
sched_param
;
sched_param
.
sched_priority
=
50
;
sched_setscheduler
(
0
,
SCHED_FIFO
|
SCHED_RESET_ON_FORK
,
&
sched_param
);
int
policy
=
SCHED_FIFO
;
#ifdef SCHED_RESET_ON_FORK
policy
|=
SCHED_RESET_ON_FORK
;
#endif
sched_setscheduler
(
0
,
policy
,
&
sched_param
);
#endif
};
...
...
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