マルチスレッドのプログラミング

pthread_self(3T)

pthread_self(3T) は、呼び出しスレッドの識別子を取得します。


プロトタイプ:
pthread_t	 pthread_self(void);

#include <pthread.h>

pthread_t tid;

tid = pthread_self();

戻り値

呼び出しスレッドの識別子が戻されます。