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>
This commit is contained in:
Josh Steadmon 2020-11-11 15:29:26 -08:00 committed by Junio C Hamano
parent 81bd549010
commit e97e1cf464
2 changed files with 7 additions and 0 deletions

View File

@ -792,3 +792,8 @@ void trace2_printf(const char *fmt, ...)
va_end(ap);
}
#endif
const char *trace2_session_id(void)
{
return tr2_sid_get();
}

View File

@ -500,4 +500,6 @@ void trace2_collect_process_info(enum trace2_process_info_reason reason);
} while (0)
#endif
const char *trace2_session_id(void);
#endif /* TRACE2_H */