libosmocore 1.13.1.1-afb4 Osmocom core library

Files | Functions
Osmocom thread helpers

## Files
file | thread.h
| Compatibility header with some thread related helpers.
file | thread.c
file | thread.c

## Functions
pid_t | osmo_gettid (void)
| Wrapper around Linux's gettid() to make it easily accessible on different system versions. More...

## Detailed Description

## Function Documentation

## ◆ osmo_gettid()

pid_t osmo_gettid | ( | void |  | ) |

Wrapper around Linux'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 'man 2 gettid' for further and details information.

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).

Referenced by _gsmtap_raw_output(), and log_output_buf().