X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=blobdiff_plain;f=src%2Fcommon.c;h=df2ef7a4d376a395587815939dc224fa1926cab9;hp=ad190c918c753b5cace0ccb5d8bf7475bbc01426;hb=3ba84bed69e8eb8e6794a7250da97406dbbe02c2;hpb=06570214a7aa236670706a1aac01c3f352e7454d diff --git a/src/common.c b/src/common.c index ad190c9..df2ef7a 100644 --- a/src/common.c +++ b/src/common.c @@ -20,9 +20,9 @@ #include #include "common.h" -uint64_t get_cpu_id(struct bt_ctf_event *event) +uint64_t get_cpu_id(const struct bt_ctf_event *event) { - struct definition *scope; + const struct definition *scope; uint64_t cpu_id; scope = bt_ctf_get_top_level_scope(event, BT_STREAM_PACKET_CONTEXT); @@ -35,9 +35,9 @@ uint64_t get_cpu_id(struct bt_ctf_event *event) return cpu_id; } -uint64_t get_context_tid(struct bt_ctf_event *event) +uint64_t get_context_tid(const struct bt_ctf_event *event) { - struct definition *scope; + const struct definition *scope; uint64_t tid; scope = bt_ctf_get_top_level_scope(event, BT_STREAM_EVENT_CONTEXT); @@ -51,9 +51,9 @@ uint64_t get_context_tid(struct bt_ctf_event *event) return tid; } -uint64_t get_context_pid(struct bt_ctf_event *event) +uint64_t get_context_pid(const struct bt_ctf_event *event) { - struct definition *scope; + const struct definition *scope; uint64_t pid; scope = bt_ctf_get_top_level_scope(event, BT_STREAM_EVENT_CONTEXT); @@ -67,9 +67,9 @@ uint64_t get_context_pid(struct bt_ctf_event *event) return pid; } -uint64_t get_context_ppid(struct bt_ctf_event *event) +uint64_t get_context_ppid(const struct bt_ctf_event *event) { - struct definition *scope; + const struct definition *scope; uint64_t ppid; scope = bt_ctf_get_top_level_scope(event, BT_STREAM_EVENT_CONTEXT); @@ -83,9 +83,9 @@ uint64_t get_context_ppid(struct bt_ctf_event *event) return ppid; } -char *get_context_comm(struct bt_ctf_event *event) +char *get_context_comm(const struct bt_ctf_event *event) { - struct definition *scope; + const struct definition *scope; char *comm; scope = bt_ctf_get_top_level_scope(event, BT_STREAM_EVENT_CONTEXT);