diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /po/fr/man3/pthread_attr_init.3.po | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'po/fr/man3/pthread_attr_init.3.po')
-rw-r--r-- | po/fr/man3/pthread_attr_init.3.po | 1062 |
1 files changed, 1062 insertions, 0 deletions
diff --git a/po/fr/man3/pthread_attr_init.3.po b/po/fr/man3/pthread_attr_init.3.po new file mode 100644 index 00000000..2e1e5386 --- /dev/null +++ b/po/fr/man3/pthread_attr_init.3.po @@ -0,0 +1,1062 @@ +# French translation of manpages +# This file is distributed under the same license as the manpages-l10n package. +# Copyright © of this file: +# Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003. +# Stéphan Rafin <stephan.rafin@laposte.net>, 2002. +# Thierry Vignaud <tvignaud@mandriva.com>, 1999, 2002. +# François Micaux, 2002. +# Alain Portal <aportal@univ-montp2.fr>, 2003-2008. +# Jean-Philippe Guérard <fevrier@tigreraye.org>, 2005-2006. +# Jean-Luc Coulon (f5ibh) <jean-luc.coulon@wanadoo.fr>, 2006-2007. +# Julien Cristau <jcristau@debian.org>, 2006-2007. +# Thomas Huriaux <thomas.huriaux@gmail.com>, 2006-2008. +# Nicolas François <nicolas.francois@centraliens.net>, 2006-2008. +# Florentin Duneau <fduneau@gmail.com>, 2006-2010. +# Simon Paillard <simon.paillard@resel.enst-bretagne.fr>, 2006. +# Denis Barbier <barbier@debian.org>, 2006, 2010. +# David Prévot <david@tilapin.org>, 2010, 2012. +# Frédéric Hantrais <fhantrais@gmail.com>, 2013, 2014. +# Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>, 2023. +msgid "" +msgstr "" +"Project-Id-Version: perkamon\n" +"POT-Creation-Date: 2024-03-01 17:04+0100\n" +"PO-Revision-Date: 2023-07-27 08:34+0200\n" +"Last-Translator: Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>\n" +"Language-Team: French <debian-l10n-french@lists.debian.org>\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Lokalize 22.12.3\n" + +#. type: TH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "pthread_attr_init" +msgstr "pthread_attr_init" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "2023-10-31" +msgstr "31 octobre 2023" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "Linux man-pages 6.06" +msgstr "Pages du manuel de Linux 6.06" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NAME" +msgstr "NOM" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"pthread_attr_init, pthread_attr_destroy - initialize and destroy thread " +"attributes object" +msgstr "" +"pthread_attr_init, pthread_attr_destroy — Initialiser et détruire un objet " +"d'attributs de thread" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "LIBRARY" +msgstr "BIBLIOTHÈQUE" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "POSIX threads library (I<libpthread>, I<-lpthread>)" +msgstr "Bibliothèque de threads POSIX (I<libpthread>, I<-lpthread>)" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SYNOPSIS" +msgstr "SYNOPSIS" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<#include E<lt>pthread.hE<gt>>\n" +msgstr "B<#include E<lt>pthread.hE<gt>>\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n" +"B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n" +msgstr "" +"B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n" +"B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "DESCRIPTION" +msgstr "DESCRIPTION" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The B<pthread_attr_init>() function initializes the thread attributes " +"object pointed to by I<attr> with default attribute values. After this " +"call, individual attributes of the object can be set using various related " +"functions (listed under SEE ALSO), and then the object can be used in one or " +"more B<pthread_create>(3) calls that create threads." +msgstr "" +"La fonction B<pthread_attr_init>() initialise l'objet d'attributs de thread " +"pointé par I<attr> avec des valeurs d'attributs par défaut. Après cet appel, " +"les attributs individuels de cet objet peuvent être modifiés en utilisant " +"diverses fonctions (listées dans la section VOIR AUSSI), et l'objet peut " +"alors être utilisé dans un ou plusieurs appels de B<pthread_create>(3) pour " +"créer des threads." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Calling B<pthread_attr_init>() on a thread attributes object that has " +"already been initialized results in undefined behavior." +msgstr "" +"Appeler B<pthread_attr_init>() sur un objet d'attributs de thread qui a déjà " +"été initialisé résulte en un comportement indéfini." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"When a thread attributes object is no longer required, it should be " +"destroyed using the B<pthread_attr_destroy>() function. Destroying a " +"thread attributes object has no effect on threads that were created using " +"that object." +msgstr "" +"Quand un objet d'attributs de thread n'est plus nécessaire, il devrait être " +"détruit en appelant la fonction B<pthread_attr_destroy>(). Détruire un objet " +"d'attributs de thread n'a aucun effet sur les threads qui ont été créés en " +"utilisant cet objet." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Once a thread attributes object has been destroyed, it can be reinitialized " +"using B<pthread_attr_init>(). Any other use of a destroyed thread " +"attributes object has undefined results." +msgstr "" +"Dès qu'un objet d'attributs de thread a été détruit, il peut être " +"réinitialisé en appelant B<pthread_attr_init>(). Toute autre utilisation " +"d'un objet d'attributs de thread entraîne des résultats indéfinis." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "RETURN VALUE" +msgstr "VALEUR RENVOYÉE" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"On success, these functions return 0; on error, they return a nonzero error " +"number." +msgstr "" +"En cas de succès, ces fonctions renvoient B<0> ; en cas d'erreur, elles " +"renvoient un code d'erreur non nul." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "ERRORS" +msgstr "ERREURS" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"POSIX.1 documents an B<ENOMEM> error for B<pthread_attr_init>(); on Linux " +"these functions always succeed (but portable and future-proof applications " +"should nevertheless handle a possible error return)." +msgstr "" +"POSIX.1 documente une erreur B<ENOMEM> pour B<pthread_attr_init>(). Sous " +"Linux, ces fonctions réussissent toujours (mais les applications portables " +"et à l'épreuve du temps devraient néanmoins prendre en charge une possible " +"valeur de retour)." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "ATTRIBUTES" +msgstr "ATTRIBUTS" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"For an explanation of the terms used in this section, see B<attributes>(7)." +msgstr "" +"Pour une explication des termes utilisés dans cette section, consulter " +"B<attributes>(7)." + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Interface" +msgstr "Interface" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Attribute" +msgstr "Attribut" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Value" +msgstr "Valeur" + +#. type: tbl table +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid ".na\n" +msgstr ".na\n" + +#. type: tbl table +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid ".nh\n" +msgstr ".nh\n" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<pthread_attr_init>(),\n" +"B<pthread_attr_destroy>()" +msgstr "" +"B<pthread_attr_init>(),\n" +"B<pthread_attr_destroy>()" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Thread safety" +msgstr "Sécurité des threads" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "MT-Safe" +msgstr "MT-Safe" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "STANDARDS" +msgstr "STANDARDS" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "POSIX.1-2008." +msgstr "POSIX.1-2008." + +#. type: SH +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "HISTORY" +msgstr "HISTORIQUE" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "POSIX.1-2001." +msgstr "POSIX.1-2001." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NOTES" +msgstr "NOTES" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<pthread_attr_t> type should be treated as opaque: any access to the " +"object other than via pthreads functions is nonportable and produces " +"undefined results." +msgstr "" +"Le type I<pthread_attr_t> doit être traité comme opaque\\ ; tout accès à " +"l'objet en dehors des fonctions pthreads n'est pas portable et peut produire " +"des résultats indéfinis." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "EXAMPLES" +msgstr "EXEMPLES" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The program below optionally makes use of B<pthread_attr_init>() and " +"various related functions to initialize a thread attributes object that is " +"used to create a single thread. Once created, the thread uses the " +"B<pthread_getattr_np>(3) function (a nonstandard GNU extension) to retrieve " +"the thread's attributes, and then displays those attributes." +msgstr "" +"Le programme ci-dessous fait un appel optionnel à B<pthread_attr_init>() et " +"à d'autres fonctions similaires pour initialiser un objet d'attributs de " +"thread afin de l'utiliser pour créer un thread unique. Une fois créé, le " +"thread utilise la fonction B<pthread_getattr_np>(3) (une extension GNU non " +"standard) pour récupérer les attributs de thread et les afficher." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"If the program is run with no command-line argument, then it passes NULL as " +"the I<attr> argument of B<pthread_create>(3), so that the thread is created " +"with default attributes. Running the program on Linux/x86-32 with the NPTL " +"threading implementation, we see the following:" +msgstr "" +"Si le programme est exécuté sans argument sur la ligne de commande, alors il " +"passe NULL comme valeur de l'argument I<attr> de B<pthread_create>(3), si " +"bien que le thread est créé avec les attributs par défaut. En exécutant ce " +"programme sur Linux/x86-32 avec l'implémentation NPTL, l'affichage sera\\ :" + +#. Results from glibc 2.8, SUSE 11.0; Oct 2008 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$B< ulimit -s> # No stack limit ==E<gt> default stack size is 2 MB\n" +"unlimited\n" +"$B< ./a.out>\n" +"Thread attributes:\n" +" Detach state = PTHREAD_CREATE_JOINABLE\n" +" Scope = PTHREAD_SCOPE_SYSTEM\n" +" Inherit scheduler = PTHREAD_INHERIT_SCHED\n" +" Scheduling policy = SCHED_OTHER\n" +" Scheduling priority = 0\n" +" Guard size = 4096 bytes\n" +" Stack address = 0x40196000\n" +" Stack size = 0x201000 bytes\n" +msgstr "" +"$B< ulimit -s> # No stack limit ==E<gt> default stack size is 2 MB\n" +"unlimited\n" +"$B< ./a.out>\n" +"Thread attributes:\n" +" Detach state = PTHREAD_CREATE_JOINABLE\n" +" Scope = PTHREAD_SCOPE_SYSTEM\n" +" Inherit scheduler = PTHREAD_INHERIT_SCHED\n" +" Scheduling policy = SCHED_OTHER\n" +" Scheduling priority = 0\n" +" Guard size = 4096 bytes\n" +" Stack address = 0x40196000\n" +" Stack size = 0x201000 bytes\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"When we supply a stack size as a command-line argument, the program " +"initializes a thread attributes object, sets various attributes in that " +"object, and passes a pointer to the object in the call to " +"B<pthread_create>(3). Running the program on Linux/x86-32 with the NPTL " +"threading implementation, we see the following:" +msgstr "" +"Quand une taille de pile est passée sur la ligne de commande, le programme " +"initialise un objet d'attributs de thread, modifie divers attributs de cet " +"objet, et passe un pointeur sur cet objet dans l'appel à " +"B<pthread_create>(3). En exécutant ce programme sur Linux/x86-32 avec " +"l'implémentation NPTL, l'affichage sera\\ :" + +#. Results from glibc 2.8, SUSE 11.0; Oct 2008 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$B< ./a.out 0x3000000>\n" +"posix_memalign() allocated at 0x40197000\n" +"Thread attributes:\n" +" Detach state = PTHREAD_CREATE_DETACHED\n" +" Scope = PTHREAD_SCOPE_SYSTEM\n" +" Inherit scheduler = PTHREAD_EXPLICIT_SCHED\n" +" Scheduling policy = SCHED_OTHER\n" +" Scheduling priority = 0\n" +" Guard size = 0 bytes\n" +" Stack address = 0x40197000\n" +" Stack size = 0x3000000 bytes\n" +msgstr "" +"$B< ./a.out 0x3000000>\n" +"posix_memalign() allocated at 0x40197000\n" +"Thread attributes:\n" +" Detach state = PTHREAD_CREATE_DETACHED\n" +" Scope = PTHREAD_SCOPE_SYSTEM\n" +" Inherit scheduler = PTHREAD_EXPLICIT_SCHED\n" +" Scheduling policy = SCHED_OTHER\n" +" Scheduling priority = 0\n" +" Guard size = 0 bytes\n" +" Stack address = 0x40197000\n" +" Stack size = 0x3000000 bytes\n" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Program source" +msgstr "Source du programme" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid "" +"#define _GNU_SOURCE /* To get pthread_getattr_np() declaration */\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>errno.hE<gt>\n" +"#include E<lt>pthread.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"\\&\n" +"static void\n" +"display_pthread_attr(pthread_attr_t *attr, char *prefix)\n" +"{\n" +" int s, i;\n" +" size_t v;\n" +" void *stkaddr;\n" +" struct sched_param sp;\n" +"\\&\n" +" s = pthread_attr_getdetachstate(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getdetachstate\");\n" +" printf(\"%sDetach state = %s\\en\", prefix,\n" +" (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n" +" (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n" +" \"???\");\n" +"\\&\n" +" s = pthread_attr_getscope(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getscope\");\n" +" printf(\"%sScope = %s\\en\", prefix,\n" +" (i == PTHREAD_SCOPE_SYSTEM) ? \"PTHREAD_SCOPE_SYSTEM\" :\n" +" (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n" +" \"???\");\n" +"\\&\n" +" s = pthread_attr_getinheritsched(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getinheritsched\");\n" +" printf(\"%sInherit scheduler = %s\\en\", prefix,\n" +" (i == PTHREAD_INHERIT_SCHED) ? \"PTHREAD_INHERIT_SCHED\" :\n" +" (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n" +" \"???\");\n" +"\\&\n" +" s = pthread_attr_getschedpolicy(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getschedpolicy\");\n" +" printf(\"%sScheduling policy = %s\\en\", prefix,\n" +" (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n" +" (i == SCHED_FIFO) ? \"SCHED_FIFO\" :\n" +" (i == SCHED_RR) ? \"SCHED_RR\" :\n" +" \"???\");\n" +"\\&\n" +" s = pthread_attr_getschedparam(attr, &sp);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getschedparam\");\n" +" printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n" +"\\&\n" +" s = pthread_attr_getguardsize(attr, &v);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getguardsize\");\n" +" printf(\"%sGuard size = %zu bytes\\en\", prefix, v);\n" +"\\&\n" +" s = pthread_attr_getstack(attr, &stkaddr, &v);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getstack\");\n" +" printf(\"%sStack address = %p\\en\", prefix, stkaddr);\n" +" printf(\"%sStack size = %#zx bytes\\en\", prefix, v);\n" +"}\n" +"\\&\n" +"static void *\n" +"thread_start(void *arg)\n" +"{\n" +" int s;\n" +" pthread_attr_t gattr;\n" +"\\&\n" +" /* pthread_getattr_np() is a non-standard GNU extension that\n" +" retrieves the attributes of the thread specified in its\n" +" first argument. */\n" +"\\&\n" +" s = pthread_getattr_np(pthread_self(), &gattr);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_getattr_np\");\n" +"\\&\n" +" printf(\"Thread attributes:\\en\");\n" +" display_pthread_attr(&gattr, \"\\et\");\n" +"\\&\n" +" exit(EXIT_SUCCESS); /* Terminate all threads */\n" +"}\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" pthread_t thr;\n" +" pthread_attr_t attr;\n" +" pthread_attr_t *attrp; /* NULL or &attr */\n" +" int s;\n" +"\\&\n" +" attrp = NULL;\n" +"\\&\n" +" /* If a command-line argument was supplied, use it to set the\n" +" stack-size attribute and set a few other thread attributes,\n" +" and set attrp pointing to thread attributes object. */\n" +"\\&\n" +" if (argc E<gt> 1) {\n" +" size_t stack_size;\n" +" void *sp;\n" +"\\&\n" +" attrp = &attr;\n" +"\\&\n" +" s = pthread_attr_init(&attr);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_init\");\n" +"\\&\n" +" s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setdetachstate\");\n" +"\\&\n" +" s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setinheritsched\");\n" +"\\&\n" +" stack_size = strtoul(argv[1], NULL, 0);\n" +"\\&\n" +" s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"posix_memalign\");\n" +"\\&\n" +" printf(\"posix_memalign() allocated at %p\\en\", sp);\n" +"\\&\n" +" s = pthread_attr_setstack(&attr, sp, stack_size);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setstack\");\n" +" }\n" +"\\&\n" +" s = pthread_create(&thr, attrp, &thread_start, NULL);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_create\");\n" +"\\&\n" +" if (attrp != NULL) {\n" +" s = pthread_attr_destroy(attrp);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_destroy\");\n" +" }\n" +"\\&\n" +" pause(); /* Terminates when other thread calls exit() */\n" +"}\n" +msgstr "" + +#. SRC END +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SEE ALSO" +msgstr "VOIR AUSSI" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), " +"B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), " +"B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), " +"B<pthread_attr_setscope>(3), B<pthread_attr_setsigmask_np>(3), " +"B<pthread_attr_setstack>(3), B<pthread_attr_setstackaddr>(3), " +"B<pthread_attr_setstacksize>(3), B<pthread_create>(3), " +"B<pthread_getattr_np>(3), B<pthread_setattr_default_np>(3), B<pthreads>(7)" +msgstr "" +"B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), " +"B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), " +"B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), " +"B<pthread_attr_setscope>(3), B<pthread_attr_setsigmask_np>(3), " +"B<pthread_attr_setstack>(3), B<pthread_attr_setstackaddr>(3), " +"B<pthread_attr_setstacksize>(3), B<pthread_create>(3), " +"B<pthread_getattr_np>(3), B<pthread_setattr_default_np>(3), B<pthreads>(7)" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "2022-12-15" +msgstr "15 décembre 2022" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "Linux man-pages 6.03" +msgstr "Pages du manuel de Linux 6.03" + +#. type: Plain text +#: debian-bookworm +msgid "POSIX.1-2001, POSIX.1-2008." +msgstr "POSIX.1-2001, POSIX.1-2008." + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#define _GNU_SOURCE /* To get pthread_getattr_np() declaration */\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>errno.hE<gt>\n" +"#include E<lt>pthread.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +msgstr "" +"#define _GNU_SOURCE /* Pour obtenir la déclaration de pthread_getattr_np() */\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>errno.hE<gt>\n" +"#include E<lt>pthread.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"static void\n" +"display_pthread_attr(pthread_attr_t *attr, char *prefix)\n" +"{\n" +" int s, i;\n" +" size_t v;\n" +" void *stkaddr;\n" +" struct sched_param sp;\n" +msgstr "" +"static void\n" +"display_pthread_attr(pthread_attr_t *attr, char *prefix)\n" +"{\n" +" int s, i;\n" +" size_t v;\n" +" void *stkaddr;\n" +" struct sched_param sp;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_getdetachstate(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getdetachstate\");\n" +" printf(\"%sDetach state = %s\\en\", prefix,\n" +" (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n" +" (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n" +" \"???\");\n" +msgstr "" +" s = pthread_attr_getdetachstate(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getdetachstate\");\n" +" printf(\"%sDetach state = %s\\en\", prefix,\n" +" (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n" +" (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n" +" \"???\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_getscope(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getscope\");\n" +" printf(\"%sScope = %s\\en\", prefix,\n" +" (i == PTHREAD_SCOPE_SYSTEM) ? \"PTHREAD_SCOPE_SYSTEM\" :\n" +" (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n" +" \"???\");\n" +msgstr "" +" s = pthread_attr_getscope(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getscope\");\n" +" printf(\"%sScope = %s\\en\", prefix,\n" +" (i == PTHREAD_SCOPE_SYSTEM) ? \"PTHREAD_SCOPE_SYSTEM\" :\n" +" (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n" +" \"???\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_getinheritsched(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getinheritsched\");\n" +" printf(\"%sInherit scheduler = %s\\en\", prefix,\n" +" (i == PTHREAD_INHERIT_SCHED) ? \"PTHREAD_INHERIT_SCHED\" :\n" +" (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n" +" \"???\");\n" +msgstr "" +" s = pthread_attr_getinheritsched(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getinheritsched\");\n" +" printf(\"%sInherit scheduler = %s\\en\", prefix,\n" +" (i == PTHREAD_INHERIT_SCHED) ? \"PTHREAD_INHERIT_SCHED\" :\n" +" (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n" +" \"???\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_getschedpolicy(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getschedpolicy\");\n" +" printf(\"%sScheduling policy = %s\\en\", prefix,\n" +" (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n" +" (i == SCHED_FIFO) ? \"SCHED_FIFO\" :\n" +" (i == SCHED_RR) ? \"SCHED_RR\" :\n" +" \"???\");\n" +msgstr "" +" s = pthread_attr_getschedpolicy(attr, &i);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getschedpolicy\");\n" +" printf(\"%sScheduling policy = %s\\en\", prefix,\n" +" (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n" +" (i == SCHED_FIFO) ? \"SCHED_FIFO\" :\n" +" (i == SCHED_RR) ? \"SCHED_RR\" :\n" +" \"???\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_getschedparam(attr, &sp);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getschedparam\");\n" +" printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n" +msgstr "" +" s = pthread_attr_getschedparam(attr, &sp);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getschedparam\");\n" +" printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_getguardsize(attr, &v);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getguardsize\");\n" +" printf(\"%sGuard size = %zu bytes\\en\", prefix, v);\n" +msgstr "" +" s = pthread_attr_getguardsize(attr, &v);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getguardsize\");\n" +" printf(\"%sGuard size = %zu bytes\\en\", prefix, v);\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_getstack(attr, &stkaddr, &v);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getstack\");\n" +" printf(\"%sStack address = %p\\en\", prefix, stkaddr);\n" +" printf(\"%sStack size = %#zx bytes\\en\", prefix, v);\n" +"}\n" +msgstr "" +" s = pthread_attr_getstack(attr, &stkaddr, &v);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_getstack\");\n" +" printf(\"%sStack address = %p\\en\", prefix, stkaddr);\n" +" printf(\"%sStack size = %#zx bytes\\en\", prefix, v);\n" +"}\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"static void *\n" +"thread_start(void *arg)\n" +"{\n" +" int s;\n" +" pthread_attr_t gattr;\n" +msgstr "" +"static void *\n" +"thread_start(void *arg)\n" +"{\n" +" int s;\n" +" pthread_attr_t gattr;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" /* pthread_getattr_np() is a non-standard GNU extension that\n" +" retrieves the attributes of the thread specified in its\n" +" first argument. */\n" +msgstr "" +" /* pthread_getattr_np() est une extension GNU non standard qui\n" +" extrait les attributs du thread spécifié dans son premier\n" +" argument. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_getattr_np(pthread_self(), &gattr);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_getattr_np\");\n" +msgstr "" +" s = pthread_getattr_np(pthread_self(), &gattr);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_getattr_np\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" printf(\"Thread attributes:\\en\");\n" +" display_pthread_attr(&gattr, \"\\et\");\n" +msgstr "" +" printf(\"Thread attributes:\\en\");\n" +" display_pthread_attr(&gattr, \"\\et\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" exit(EXIT_SUCCESS); /* Terminate all threads */\n" +"}\n" +msgstr "" +" exit(EXIT_SUCCESS); /* Terminer tous les threads */\n" +"}\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" pthread_t thr;\n" +" pthread_attr_t attr;\n" +" pthread_attr_t *attrp; /* NULL or &attr */\n" +" int s;\n" +msgstr "" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" pthread_t thr;\n" +" pthread_attr_t attr;\n" +" pthread_attr_t *attrp; /* NULL ou &attr */\n" +" int s;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " attrp = NULL;\n" +msgstr " attrp = NULL;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" /* If a command-line argument was supplied, use it to set the\n" +" stack-size attribute and set a few other thread attributes,\n" +" and set attrp pointing to thread attributes object. */\n" +msgstr "" +" /* Si un argument en ligne de commande a été fourni, utilisez le\n" +" pour définir l'attribut de taille de la pile et quelques autres\n" +" attributs du thread ainsi que l'attribut attrp pointant sur\n" +" l'objet d'attributs de thread. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (argc E<gt> 1) {\n" +" size_t stack_size;\n" +" void *sp;\n" +msgstr "" +" if (argc E<gt> 1) {\n" +" size_t stack_size;\n" +" void *sp;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " attrp = &attr;\n" +msgstr " attrp = &attr;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_init(&attr);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_init\");\n" +msgstr "" +" s = pthread_attr_init(&attr);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_init\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setdetachstate\");\n" +msgstr "" +" s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setdetachstate\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setinheritsched\");\n" +msgstr "" +" s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setinheritsched\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " stack_size = strtoul(argv[1], NULL, 0);\n" +msgstr " stack_size = strtoul(argv[1], NULL, 0);\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"posix_memalign\");\n" +msgstr "" +" s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"posix_memalign\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " printf(\"posix_memalign() allocated at %p\\en\", sp);\n" +msgstr " printf(\"posix_memalign() allocated at %p\\en\", sp);\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_setstack(&attr, sp, stack_size);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setstack\");\n" +" }\n" +msgstr "" +" s = pthread_attr_setstack(&attr, sp, stack_size);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_setstack\");\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_create(&thr, attrp, &thread_start, NULL);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_create\");\n" +msgstr "" +" s = pthread_create(&thr, attrp, &thread_start, NULL);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_create\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (attrp != NULL) {\n" +" s = pthread_attr_destroy(attrp);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_destroy\");\n" +" }\n" +msgstr "" +" if (attrp != NULL) {\n" +" s = pthread_attr_destroy(attrp);\n" +" if (s != 0)\n" +" errc(EXIT_FAILURE, s, \"pthread_attr_destroy\");\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" pause(); /* Terminates when other thread calls exit() */\n" +"}\n" +msgstr "" +" pause(); /* Termine quand un autre thread appelle exit() */\n" +"}\n" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "2023-07-20" +msgstr "20 juillet 2023" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages 6.05.01" +msgstr "Pages du manuel de Linux 6.05.01" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "2023-03-30" +msgstr "30 mars 2023" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "Linux man-pages 6.04" +msgstr "Pages du manuel de Linux 6.04" |