.\" -*- coding: UTF-8 -*- .\" Copyright 2003 Abhijit Menon-Sen .\" and Copyright (C) 2008 Michael Kerrisk .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH GETTID 2 "11 avril 2020" Linux "Manuel du programmeur Linux" .SH NOM gettid \- Obtenir l'identifiant de thread .SH SYNOPSIS .nf \fB#define _GNU_SOURCE\fP \fB#include \fP \fB#include \fP .PP \fBpid_t gettid(void);\fP .fi .SH DESCRIPTION \fBgettid\fP() renvoie l'identifiant de thread (TID) du processus appelant. Dans un processus avec un seul thread, l'identifiant de thread est égal à l'identifiant du processus (le PID tel que renvoyé par \fBgetpid\fP(2)). Dans un processus multithreadé, tous les processus ont le même PID mais chacun a un TID unique. Pour plus de détails, consultez la discussion sur \fBCLONE_THREAD\fP dans \fBclone\fP(2). .SH "VALEUR RENVOYÉE" En cas de succès, l'identifiant de thread du thread appelant est renvoyé. .SH ERREURS Cette fonction réussit toujours. .SH VERSIONS L'appel système \fBgettid\fP() est apparu pour la première fois dans le noyau 2.4.11 de Linux. La prise en charge au niveau de la bibliothèque a été ajoutée à la glibc 2.30 (les versions antérieures de la glibc ne fournissaient pas d'enveloppe pour cet appel système, obligeant à utiliser \fBsyscall\fP(2)). .SH CONFORMITÉ \fBgettid\fP() est spécifique à Linux et ne doit pas être employé dans un programme conçu pour être portable. .SH NOTES Le TID renvoyé par cet appel n'est pas la même chose que l'identifiant de thread POSIX (c'est\-à\-dire, la valeur opaque renvoyée par \fBpthread_self\fP(3)). .PP Dans un nouveau groupe de threads créé par un appel \fBclone\fP(2) n'indiquant pas l'attribut \fBCLONE_THREAD\fP (ou, de la même manière, dans un nouveau processus créé par \fBfork\fP(2)), le nouveau processus est le meneur d'un groupe de threads et son identifiant de groupe de threads (valeur renvoyée par \fBgetpid\fP(2)) est la même que son identifiant de thread (valeur renvoyée par \fBgettid\fP()). .SH "VOIR AUSSI" .\" .BR kcmp (2), .\" .BR move_pages (2), .\" .BR migrate_pages (2), .\" .BR process_vm_readv (2), .\" .BR ptrace (2), \fBcapget\fP(2), \fBclone\fP(2), \fBfcntl\fP(2), \fBfork\fP(2), \fBget_robust_list\fP(2), \fBgetpid\fP(2), \fBioprio_set\fP(2), \fBperf_event_open\fP(2), \fBsched_setaffinity\fP(2), \fBsched_setparam\fP(2), \fBsched_setscheduler\fP(2), \fBtgkill\fP(2), \fBtimer_create\fP(2) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier , David Prévot et Jean-Philippe MENGUAL . .PP Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. .PP Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .