Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
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
uplex-varnish
slash
Commits
32ad79de
Unverified
Commit
32ad79de
authored
Nov 02, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logwatcher: Use cond_signal instead of cond_broadcast on watcher_cond
as there is only one thread waiting
parent
c9c26b50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fellow_log.c
src/fellow_log.c
+3
-3
No files found.
src/fellow_log.c
View file @
32ad79de
...
...
@@ -5391,7 +5391,7 @@ fellow_logs_rewrite(struct fellow_fd *ffd,
AZ
(
pthread_mutex_lock
(
&
ffd
->
logmtx
));
ffd
->
rewriting
=
0
;
if
(
ffd
->
watcher_running
)
AZ
(
pthread_cond_
broadcast
(
&
ffd
->
watcher_cond
));
AZ
(
pthread_cond_
signal
(
&
ffd
->
watcher_cond
));
AZ
(
pthread_mutex_unlock
(
&
ffd
->
logmtx
));
ffd
->
diag
(
"... done: %fs
\n
"
,
VTIM_mono
()
-
t0
);
}
...
...
@@ -5761,7 +5761,7 @@ static void
fellow_logwatcher_kick_locked
(
struct
fellow_fd
*
ffd
)
{
if
(
ffd
->
phase
==
FP_OPEN
&&
ffd
->
watcher_running
)
AZ
(
pthread_cond_
broadcast
(
&
ffd
->
watcher_cond
));
AZ
(
pthread_cond_
signal
(
&
ffd
->
watcher_cond
));
}
// not unter logmtx
...
...
@@ -5794,7 +5794,7 @@ fellow_logwatcher_fini(struct fellow_fd *ffd)
AZ
(
pthread_mutex_lock
(
&
ffd
->
logmtx
));
ffd
->
watcher_running
=
0
;
AZ
(
pthread_cond_
broadcast
(
&
ffd
->
watcher_cond
));
AZ
(
pthread_cond_
signal
(
&
ffd
->
watcher_cond
));
AZ
(
pthread_mutex_unlock
(
&
ffd
->
logmtx
));
AZ
(
pthread_join
(
ffd
->
watcher_thread
,
NULL
));
AZ
(
pthread_cond_destroy
(
&
ffd
->
watcher_cond
));
...
...
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