pthread_cleanup_push_defer_Library Functions Mpthread_cleanup_push_defer_np(3) NOM pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop thread cancelation clean-up handlers while saving cancelability type BIBLIOTHÈQUE Bibliothèque de threads POSIX (libpthread, -lpthread) SYNOPSIS #include <pthread.h> void pthread_cleanup_push_defer_np(void (*routine)(void *), void *arg); void pthread_cleanup_pop_restore_np(int execute); Exigences de macros de test de fonctionnalités pour la glibc (consulter feature_test_macros(7)) : pthread_cleanup_push_defer_np(), pthread_cleanup_pop_defer_np() : _GNU_SOURCE DESCRIPTION Ces fonctions opèrent de la même façon que pthread_cleanup_push(3) et pthread_cleanup_pop(3), à l'exception des différences décrites dans cette page. Like pthread_cleanup_push(3), pthread_cleanup_push_defer_np() pushes routine 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 pthread_setcancel- type(3)); this ensures that cancelation clean-up will occur even if the thread's cancelability type was "asynchronous" before the call. Like pthread_cleanup_pop(3), pthread_cleanup_pop_restore_np() 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 pthread_cleanup_push_de- fer_np(). 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 lexi- cal. D'autres restrictions s'appliquent, comme expliqué dans pthread_cleanup_push(3). Cette séquence d'appels : pthread_cleanup_push_defer_np(routine, arg); pthread_cleanup_pop_restore_np(execute); est équivalente à (mais en plus court et plus efficace) : int oldtype; pthread_cleanup_push(routine, arg); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); ... pthread_setcanceltype(oldtype, NULL); pthread_cleanup_pop(execute); STANDARDS Ces fonctions sont des extensions GNU non standard ; d'où le suffixe « _np » (non portable) dans leur nom. VOIR AUSSI pthread_cancel(3), pthread_cleanup_push(3), pthread_setcancelstate(3), pthread_testcancel(3), pthreads(7) TRADUCTION La traduction française de cette page de manuel a été créée par Chris- tophe Blaess <https://www.blaess.fr/christophe/>, Stéphan Rafin <ste- phan.rafin@laposte.net>, Thierry Vignaud <tvignaud@mandriva.com>, Fran- çois Micaux, Alain Portal <aportal@univ-montp2.fr>, Jean-Philippe Gué- rard <fevrier@tigreraye.org>, Jean-Luc Coulon (f5ibh) <jean-luc.cou- lon@wanadoo.fr>, Julien Cristau <jcristau@debian.org>, Thomas Huriaux <thomas.huriaux@gmail.com>, Nicolas François <nicolas.francois@centra- liens.net>, Florentin Duneau <fduneau@gmail.com>, Simon Paillard <si- mon.paillard@resel.enst-bretagne.fr>, Denis Barbier <barbier@de- bian.org>, David Prévot <david@tilapin.org> et Frédéric Hantrais <fhan- trais@gmail.com> Cette traduction est une documentation libre ; veuillez vous reporter à la GNU General Public License version 3 ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩ 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 à ⟨debian-l10n-french@lists.debian.org⟩. Pages du manuel de Linux 6.03 30 octobre 202pthread_cleanup_push_defer_np(3)
Generated by dwww version 1.15 on Sat Jun 29 01:38:09 CEST 2024.