projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.clang-tidy: remove modernize-concat-nested-namespaces
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
dispatch.cpp
diff --git
a/src/bin/lttng-sessiond/dispatch.cpp
b/src/bin/lttng-sessiond/dispatch.cpp
index 7fa9c8f16c5fee0a00ec2b6d222d1907188bd056..141d8b4d051c5e11af482e817d8df7faea49d77c 100644
(file)
--- a/
src/bin/lttng-sessiond/dispatch.cpp
+++ b/
src/bin/lttng-sessiond/dispatch.cpp
@@
-17,6
+17,7
@@
#include <common/futex.hpp>
#include <common/macros.hpp>
#include <common/futex.hpp>
#include <common/macros.hpp>
+#include <common/urcu.hpp>
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdlib.h>
@@
-47,7
+48,7
@@
static void update_ust_app(int app_sock)
return;
}
return;
}
-
rcu_read_lock()
;
+
lttng::urcu::read_lock_guard read_lock
;
LTTNG_ASSERT(app_sock >= 0);
app = ust_app_find_by_sock(app_sock);
if (app == nullptr) {
LTTNG_ASSERT(app_sock >= 0);
app = ust_app_find_by_sock(app_sock);
if (app == nullptr) {
@@
-57,7
+58,7
@@
static void update_ust_app(int app_sock)
* update.
*/
DBG3("UST app update failed to find app sock %d", app_sock);
* update.
*/
DBG3("UST app update failed to find app sock %d", app_sock);
-
goto unlock_rcu
;
+
return
;
}
/* Update all event notifiers for the app. */
}
/* Update all event notifiers for the app. */
@@
-78,9
+79,6
@@
static void update_ust_app(int app_sock)
session_unlock(sess);
session_put(sess);
}
session_unlock(sess);
session_put(sess);
}
-
-unlock_rcu:
- rcu_read_unlock();
}
/*
}
/*
@@
-142,8
+140,9
@@
static void sanitize_wait_queue(struct ust_reg_wait_queue *wait_queue)
if (pollfd == wait_node->app->sock && (revents & (LPOLLHUP | LPOLLERR))) {
cds_list_del(&wait_node->head);
wait_queue->count--;
if (pollfd == wait_node->app->sock && (revents & (LPOLLHUP | LPOLLERR))) {
cds_list_del(&wait_node->head);
wait_queue->count--;
- ust_app_
destroy
(wait_node->app);
+ ust_app_
put
(wait_node->app);
free(wait_node);
free(wait_node);
+
/*
* Silence warning of use-after-free in
* cds_list_for_each_entry_safe which uses
/*
* Silence warning of use-after-free in
* cds_list_for_each_entry_safe which uses
@@
-380,7
+379,7
@@
static void *thread_dispatch_ust_registration(void *data)
* and change its state.
*/
session_lock_list();
* and change its state.
*/
session_lock_list();
-
rcu_read_lock()
;
+
lttng::urcu::read_lock_guard read_lock
;
/*
* Add application to the global hash table. This needs to be
/*
* Add application to the global hash table. This needs to be
@@
-398,7
+397,6
@@
static void *thread_dispatch_ust_registration(void *data)
ret = send_socket_to_thread(
notifiers->apps_cmd_notify_pipe_write_fd, app->notify_sock);
if (ret < 0) {
ret = send_socket_to_thread(
notifiers->apps_cmd_notify_pipe_write_fd, app->notify_sock);
if (ret < 0) {
- rcu_read_unlock();
session_unlock_list();
/*
* No notify thread, stop the UST tracing. However, this is
session_unlock_list();
/*
* No notify thread, stop the UST tracing. However, this is
@@
-429,7
+427,6
@@
static void *thread_dispatch_ust_registration(void *data)
ret = send_socket_to_thread(notifiers->apps_cmd_pipe_write_fd,
app->sock);
if (ret < 0) {
ret = send_socket_to_thread(notifiers->apps_cmd_pipe_write_fd,
app->sock);
if (ret < 0) {
- rcu_read_unlock();
session_unlock_list();
/*
* No apps. thread, stop the UST tracing. However, this is
session_unlock_list();
/*
* No apps. thread, stop the UST tracing. However, this is
@@
-440,7
+437,6
@@
static void *thread_dispatch_ust_registration(void *data)
goto error;
}
goto error;
}
- rcu_read_unlock();
session_unlock_list();
}
} while (node != nullptr);
session_unlock_list();
}
} while (node != nullptr);
This page took
0.025096 seconds
and
4
git commands to generate.