.\" -*- coding: UTF-8 -*- .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk .\" .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH pthread_cleanup_push_defer_np 3 "30 octobre 2022" "Pages du manuel de Linux 6.03" .SH NOM pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np \- push and pop thread cancelation clean\-up handlers while saving cancelability type .SH BIBLIOTHÈQUE Bibliothèque de threads POSIX (\fIlibpthread\fP, \fI\-lpthread\fP) .SH SYNOPSIS .nf \fB#include \fP .PP \fBvoid pthread_cleanup_push_defer_np(void (*\fP\fIroutine\fP\fB)(void *), void *\fP\fIarg\fP\fB);\fP \fBvoid pthread_cleanup_pop_restore_np(int \fP\fIexecute\fP\fB);\fP .fi .PP .RS -4 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7))\ : .RE .PP \fBpthread_cleanup_push_defer_np\fP(), \fBpthread_cleanup_pop_defer_np\fP()\ : .nf _GNU_SOURCE .fi .SH DESCRIPTION Ces fonctions opèrent de la même façon que \fBpthread_cleanup_push\fP(3) et \fBpthread_cleanup_pop\fP(3), à l'exception des différences décrites dans cette page. .PP Like \fBpthread_cleanup_push\fP(3), \fBpthread_cleanup_push_defer_np\fP() pushes \fIroutine\fP onto the thread's stack of cancelation clean\-up handlers. In addition, it also saves the thread's current cancelability type, and sets the cancelability type to "deferred" (see \fBpthread_setcanceltype\fP(3)); this ensures that cancelation clean\-up will occur even if the thread's cancelability type was "asynchronous" before the call. .PP Like \fBpthread_cleanup_pop\fP(3), \fBpthread_cleanup_pop_restore_np\fP() pops the top\-most clean\-up handler from the thread's stack of cancelation clean\-up handlers. In addition, it restores the thread's cancelability type to its value at the time of the matching \fBpthread_cleanup_push_defer_np\fP(). .PP L'appelant doit vérifier que les appels à ces fonctions sont appariés à l'intérieur de la même fonction, et au même niveau d'imbriquement lexical. D'autres restrictions s'appliquent, comme expliqué dans \fBpthread_cleanup_push\fP(3). .PP Cette séquence d'appels\ : .PP .in +4n .EX pthread_cleanup_push_defer_np(routine, arg); pthread_cleanup_pop_restore_np(execute); .EE .in .PP est équivalente à (mais en plus court et plus efficace)\ : .PP .\" As far as I can see, LinuxThreads reverses the two substeps .\" in the push and pop below. .in +4n .EX int oldtype; pthread_cleanup_push(routine, arg); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); \&... pthread_setcanceltype(oldtype, NULL); pthread_cleanup_pop(execute); .EE .in .\" SH VERSIONS .\" Available since glibc 2.0 .SH STANDARDS Ces fonctions sont des extensions GNU non standard\ ; d'où le suffixe «\ _np\ » (non portable) dans leur nom. .SH "VOIR AUSSI" \fBpthread_cancel\fP(3), \fBpthread_cleanup_push\fP(3), \fBpthread_setcancelstate\fP(3), \fBpthread_testcancel\fP(3), \fBpthreads\fP(7) .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 Frédéric Hantrais . .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 .