projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: thread exit vs futex wait/wakeup race
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
main.c
diff --git
a/src/bin/lttng-sessiond/main.c
b/src/bin/lttng-sessiond/main.c
index 0df0b1f2e04bc4601149088740b6feec2b0bfdb2..44b88f39f5c89808ea0c02832b563a6644cd3a53 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-1868,12
+1868,16
@@
static void *thread_dispatch_ust_registration(void *data)
DBG("[thread] Dispatch UST command started");
DBG("[thread] Dispatch UST command started");
-
while (!CMM_LOAD_SHARED(dispatch_thread_exit)
) {
+
for (;;
) {
health_code_update();
/* Atomically prepare the queue futex */
futex_nto1_prepare(&ust_cmd_queue.futex);
health_code_update();
/* Atomically prepare the queue futex */
futex_nto1_prepare(&ust_cmd_queue.futex);
+ if (CMM_LOAD_SHARED(dispatch_thread_exit)) {
+ break;
+ }
+
do {
struct ust_app *app = NULL;
ust_cmd = NULL;
do {
struct ust_app *app = NULL;
ust_cmd = NULL;
This page took
0.023298 seconds
and
4
git commands to generate.