Loading...
Searching...
No Matches
Osmocom thread helpers

## Files

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

## Functions

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

## 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 _output_buf().