pthread_mutex_lock(<t_session_list.lock);
}
+/*
+ * Try to acquire session list lock
+ */
+int session_trylock_list(void)
+{
+ return pthread_mutex_trylock(<t_session_list.lock);
+}
+
/*
* Release session list lock
*/
void session_lock(struct ltt_session *session);
void session_lock_list(void);
+int session_trylock_list(void);
void session_unlock(struct ltt_session *session);
void session_unlock_list(void);
* Create and send to the application the created buffers with per UID buffers.
*
* This MUST be called with a RCU read side lock acquired.
+ * The session list lock and the session's lock must be acquired.
*
* Return 0 on success else a negative value.
*/
session = session_find_by_id(ua_sess->tracing_id);
assert(session);
+ assert(pthread_mutex_trylock(&session->lock));
+ assert(session_trylock_list());
cmd_ret = notification_thread_command_add_channel(
notification_thread_handle, session->name,
ua_sess->euid, ua_sess->egid,
* Create and send to the application the created buffers with per PID buffers.
*
* Called with UST app session lock held.
+ * The session list lock and the session's lock must be acquired.
*
* Return 0 on success else a negative value.
*/
chan_reg->consumer_key = ua_chan->key;
pthread_mutex_unlock(®istry->lock);
+ assert(pthread_mutex_trylock(&session->lock));
+ assert(session_trylock_list());
+
cmd_ret = notification_thread_command_add_channel(
notification_thread_handle, session->name,
ua_sess->euid, ua_sess->egid,