Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
ba8b0738
Commit
ba8b0738
authored
Feb 20, 2012
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 317: increase priority of the master thread
parent
498f3715
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
mongoose.c
mongoose.c
+9
-0
No files found.
mongoose.c
View file @
ba8b0738
...
@@ -4029,6 +4029,15 @@ static void master_thread(struct mg_context *ctx) {
...
@@ -4029,6 +4029,15 @@ static void master_thread(struct mg_context *ctx) {
struct
socket
*
sp
;
struct
socket
*
sp
;
int
max_fd
;
int
max_fd
;
#if defined(ISSUE_317)
// Increase priority of the master thread
struct
sched_param
sched_param
;
int
policy
;
pthread_getschedparam
(
pthread_self
(),
&
policy
,
&
sched_param
);
sched_param
.
sched_priority
=
sched_get_priority_max
(
policy
);
pthread_setschedparam
(
pthread_self
(),
policy
,
&
sched_param
);
#endif
while
(
ctx
->
stop_flag
==
0
)
{
while
(
ctx
->
stop_flag
==
0
)
{
FD_ZERO
(
&
read_set
);
FD_ZERO
(
&
read_set
);
max_fd
=
-
1
;
max_fd
=
-
1
;
...
...
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