gettid(2)

DESCRIPTION

Returns the calling thread ID.

SYNOPSIS

long gettid(void);

RETURN VALUE

  • Returns a non-negative result on success. Negative values are ABI errno codes.

ERRORS

Never fails.

ABI

Arguments enter through the direct syscall ABI; validation is performed before entering the process subsystem.