#include <common/futex.hpp>
#include <common/macros.hpp>
+#include <common/urcu.hpp>
#include <stddef.h>
#include <stdlib.h>
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) {
* update.
*/
DBG3("UST app update failed to find app sock %d", app_sock);
- goto unlock_rcu;
+ return;
}
/* Update all event notifiers for the app. */
session_unlock(sess);
session_put(sess);
}
-
-unlock_rcu:
- rcu_read_unlock();
}
/*
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);
+
/*
* Silence warning of use-after-free in
* cds_list_for_each_entry_safe which uses
* 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
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
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
goto error;
}
- rcu_read_unlock();
session_unlock_list();
}
} while (node != nullptr);