.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2004 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%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 SET_TID_ADDRESS 2 "21 décembre 2020" Linux "Manuel du programmeur Linux" .SH NOM set_tid_address \- Positionner un pointeur vers un identifiant de thread (TID) .SH SYNOPSIS .nf \fB#include \fP .PP \fBpid_t set_tid_address(int *\fP\fItidptr\fP\fB);\fP .fi .PP \fINote\fP\ : il n'existe pas d'enveloppe pour cet appel système dans la glibc\ ; voir NOTES. .SH DESCRIPTION Pour chaque thread, Le noyau maintient deux attributs (adresses) nommés \fIset_child_tid\fP et \fIclear_child_tid\fP. Ces deux attributs contiennent la valeur NULL par défaut. .TP \fIset_child_tid\fP Si un thread est démarré en utilisant \fBclone\fP(2) avec l'attribut \fBCLONE_CHILD_SETTID\fP, \fIset_child_tid\fP est définie à la valeur passée à l'argument \fIctid\fP de cet appel système. .IP Lorsque \fIset_child_tid\fP est remplie, la toute première chose que le nouveau thread fait est d'écrire son ID de thread à cette adresse. .TP \fIclear_child_tid\fP Si un thread est démarré en utilisant \fBclone\fP(2) avec l'attribut \fBCLONE_CHILD_CLEARTID\fP, \fIclear_child_tid\fP est définie à la valeur passée à l'argument \fIctid\fP de cet appel système. .PP L'appel système \fBset_tid_address\fP() remplit la valeur \fIclear_child_tid\fP pour le thread appelant à \fItidptr\fP. .PP Lorsqu'un thread dont \fIclear_child_tid\fP n'est pas NULL se termine, alors, si le thread partage de la mémoire avec d'autres threads, 0 est écrit à l'adresse indiquée dans \fIclear_child_tid\fP et le noyau réalise l'opération suivante\ : .PP futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0); .PP L'effet de cette opération est de réveiller un simple thread qui réalise une attente futex à l'emplacement de la mémoire. Les erreurs de l'opération de réveil du futex sont ignorées. .SH "VALEUR RENVOYÉE" \fBset_tid_address\fP() renvoie toujours l'identifiant du thread appelant. .SH ERREURS \fBset_tid_address\fP() réussit toujours. .SH VERSIONS Cet appel est présent depuis Linux 2.5.48. Les détails fournis ici sont valides depuis Linux 2.5.49. .SH CONFORMITÉ Cet appel système est spécifique à Linux. .SH NOTES La glibc ne fournit pas de fonction autour de cet appel système\ ; appelez\-le avec \fBsyscall\fP(2). .SH "VOIR AUSSI" \fBclone\fP(2), \fBfutex\fP(2), \fBgettid\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/. .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 et David Prévot . 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. 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 .