Build fix: use of mutable keyword in C file
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 7 Mar 2022 20:12:35 +0000 (15:12 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 7 Mar 2022 20:13:49 +0000 (15:13 -0500)
4045de280 is a backport of a fix against a C++ file in which `mutable`
is used to allow an ASSERT_LOCKED check. Remove the use of mutable and
make session_has_ongoing_rotation() non-const.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id6317ad5c271f08701c9545827f75010f5e2e55d

src/bin/lttng-relayd/session.c
src/bin/lttng-relayd/session.h

index d6909fce13375548a28395aa74c75e1d7e70be73..8a68c11b39f988ca3734621dfc184e360f78295e 100644 (file)
@@ -486,8 +486,6 @@ bool session_has_ongoing_rotation(const struct relay_session *session)
        struct lttng_ht_iter iter;
        struct relay_session *iterated_session;
 
-       ASSERT_LOCKED(session->lock);
-
        if (!session->id_sessiond.is_set) {
                /*
                 * The peer that created this session is too old to
index 8029dcd8e96f0865083094d2b1c84a0ccb4ae6aa..6bc006a4b8db495cb4e445d2d9ce99f38b540927 100644 (file)
@@ -73,7 +73,7 @@ struct relay_session {
 
        struct urcu_ref ref;
 
-       mutable pthread_mutex_t lock;
+       pthread_mutex_t lock;
 
        /* major/minor version used for this session. */
        uint32_t major;
@@ -156,7 +156,7 @@ void session_put(struct relay_session *session);
 int session_close(struct relay_session *session);
 int session_abort(struct relay_session *session);
 
-bool session_has_ongoing_rotation(const struct relay_session *session);
+bool session_has_ongoing_rotation(struct relay_session *session);
 
 void print_sessions(void);
 
This page took 0.027017 seconds and 4 git commands to generate.