trace2: add a public function for getting the SID

Add a public wrapper, trace2_session_id(), around tr2_sid_get(), which is intended to be private trace2 implementation. Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Josh Steadmon committed Nov 11, 2020 at 15:29 UTC e97e1cf464fa0c4646d41b9221ae88a7dca12493
2 files changed +7
trace2.c
+5
@@ -792,3 +792,8 @@ void trace2_printf(const char *fmt, ...)
792 va_end(ap);
793 }
794 #endif
795 +
796 +const char *trace2_session_id(void)
797 +{
798 + return tr2_sid_get();
799 +}
trace2.h
+2
@@ -500,4 +500,6 @@ void trace2_collect_process_info(enum trace2_process_info_reason reason);
500 } while (0)
501 #endif
502
503 +const char *trace2_session_id(void);
504 +
505 #endif /* TRACE2_H */