Add structure size field to struct lttng_session
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Mar 2021 21:02:00 +0000 (16:02 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Mar 2021 21:02:00 +0000 (16:02 -0500)
Made possible by ABI bump. This scheme can be used for extensibility.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8d264969b866e7f06a835731753911718dd09727

include/lttng/ust-events.h
liblttng-ust/lttng-events.c

index 37e5575eb06f4599e005d772094d618713e5481c..0e80c28285ffba4eff50f11b413768fb6e827a5a 100644 (file)
@@ -559,6 +559,7 @@ struct lttng_ust_session_private;
  * removed.
  */
 struct lttng_session {
+       uint32_t struct_size;                   /* Size of this structure */
        struct lttng_ust_session_private *priv; /* Private session interface */
 
        int active;                             /* Is trace session active ? */
index d29a6c712c7c1a5baf349f24a8d853542ffc2879..92f04a3c7b2462c0b8a777305f7f07b96e67c51d 100644 (file)
@@ -138,6 +138,7 @@ struct lttng_session *lttng_session_create(void)
        session = zmalloc(sizeof(struct lttng_session));
        if (!session)
                return NULL;
+       session->struct_size = sizeof(struct lttng_session);
        session_priv = zmalloc(sizeof(struct lttng_ust_session_private));
        if (!session_priv) {
                free(session);
This page took 0.026642 seconds and 4 git commands to generate.