Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   pthread_self.3p    ( 3 )

получить идентификатор вызывающего потока (get the calling thread ID)

Пролог (Prolog)

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.


Имя (Name)

pthread_self — get the calling thread ID


Синопсис (Synopsis)

#include <pthread.h>

pthread_t pthread_self(void);


Описание (Description)

The pthread_self() function shall return the thread ID of the calling thread.


Возвращаемое значение (Return value)

The pthread_self() function shall always be successful and no return value is reserved to indicate an error.


Ошибки (Error)

No errors are defined.

The following sections are informative.


Примеры (Examples)

None.

Использование в приложениях (Application usage)

None.


Обоснование (Rationale)

The pthread_self() function provides a capability similar to the getpid() function for processes and the rationale is the same: the creation call does not provide the thread ID to the created thread.


Будущие направления (Future directions)

None.


Смотри также (See also)

pthread_create(3p), pthread_equal(3p)

The Base Definitions volume of POSIX.1‐2017, pthread.h(0p)