\doxysection{Osmocom thread helpers}
\label{group__thread}\index{Osmocom thread helpers@{Osmocom thread helpers}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ thread.\+h}
\begin{DoxyCompactList}\small\item\em Compatibility header with some thread related helpers. \end{DoxyCompactList}\item 
file \textbf{ thread.\+c}
\item 
file \textbf{ thread.\+c}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
pid\+\_\+t \textbf{ osmo\+\_\+gettid} (void)
\begin{DoxyCompactList}\small\item\em Wrapper around Linux\textquotesingle{}s gettid() to make it easily accessible on different system versions. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\label{group__thread_gab13692b0278938fdaf76c8919c842403}} 
\index{Osmocom thread helpers@{Osmocom thread helpers}!osmo\_gettid@{osmo\_gettid}}
\index{osmo\_gettid@{osmo\_gettid}!Osmocom thread helpers@{Osmocom thread helpers}}
\doxysubsubsection{osmo\_gettid()}
{\footnotesize\ttfamily pid\+\_\+t osmo\+\_\+gettid (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Wrapper around Linux\textquotesingle{}s gettid() to make it easily accessible on different system versions. 

If the gettid() API cannot be found, it will use the syscall directly if available. If no syscall is found available, then getpid() is called as fallback. See \textquotesingle{}man 2 gettid\textquotesingle{} for further and details information. \begin{DoxyReturn}{Returns}
This call is always successful and returns returns the thread ID of the calling thread (or the process ID of the current process if gettid() or its syscall are unavailable in the system). 
\end{DoxyReturn}


Referenced by \textbf{ \+\_\+gsmtap\+\_\+raw\+\_\+output()}, and \textbf{ \+\_\+output\+\_\+buf()}.

