# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2024-06-01 06:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "pthreads" msgstr "" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.8" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "pthreads - POSIX threads" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "POSIX.1 specifies a set of interfaces (functions, header files) for threaded " "programming commonly known as POSIX threads, or Pthreads. A single process " "can contain multiple threads, all of which are executing the same program. " "These threads share the same global memory (data and heap segments), but " "each thread has its own stack (automatic variables)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "POSIX.1 also requires that threads share a range of other attributes (i.e., " "these attributes are process-wide rather than per-thread):" msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "\\[bu]" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "process ID" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "parent process ID" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "process group ID and session ID" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "controlling terminal" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "user and group IDs" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "open file descriptors" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "record locks (see B(2))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "signal dispositions" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "file mode creation mask (B(2))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "current directory (B(2)) and root directory (B(2))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "interval timers (B(2)) and POSIX timers (B(2))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "nice value (B(2))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "resource limits (B(2))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "measurements of the consumption of CPU time (B(2)) and resources " "(B(2))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "As well as the stack, POSIX.1 specifies that various other attributes are " "distinct for each thread, including:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "thread ID (the I data type)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "signal mask (B(3))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "the I variable" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "alternate signal stack (B(2))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "real-time scheduling policy and priority (B(7))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The following Linux-specific features are also per-thread:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "capabilities (see B(7))" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "CPU affinity (B(2))" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Pthreads function return values" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Most pthreads functions return 0 on success, and an error number on " "failure. The error numbers that can be returned have the same meaning as " "the error numbers returned in I by conventional system calls and C " "library functions. Note that the pthreads functions do not set I. " "For each of the pthreads functions that can return an error, POSIX.1-2001 " "specifies that the function can never fail with the error B." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Thread IDs" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Each of the threads in a process has a unique thread identifier (stored in " "the type I). This identifier is returned to the caller of " "B(3), and a thread can obtain its own thread identifier " "using B(3)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Thread IDs are guaranteed to be unique only within a process. (In all " "pthreads functions that accept a thread ID as an argument, that ID by " "definition refers to a thread in the same process as the caller.)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The system may reuse a thread ID after a terminated thread has been joined, " "or a detached thread has terminated. POSIX says: \"If an application " "attempts to use a thread ID whose lifetime has ended, the behavior is " "undefined.\"" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Thread-safe functions" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A thread-safe function is one that can be safely (i.e., it will deliver the " "same results regardless of whether it is) called from multiple threads at " "the same time." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the " "standard shall be thread-safe, except for the following functions:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "asctime()\n" "basename()\n" "catgets()\n" "crypt()\n" "ctermid() if passed a non-NULL argument\n" "ctime()\n" "dbm_clearerr()\n" "dbm_close()\n" "dbm_delete()\n" "dbm_error()\n" "dbm_fetch()\n" "dbm_firstkey()\n" "dbm_nextkey()\n" "dbm_open()\n" "dbm_store()\n" "dirname()\n" "dlerror()\n" "drand48()\n" "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n" "encrypt()\n" "endgrent()\n" "endpwent()\n" "endutxent()\n" "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n" "ftw()\n" "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n" "getc_unlocked()\n" "getchar_unlocked()\n" "getdate()\n" "getenv()\n" "getgrent()\n" "getgrgid()\n" "getgrnam()\n" "gethostbyaddr() [POSIX.1-2001 only (function removed in\n" " POSIX.1-2008)]\n" "gethostbyname() [POSIX.1-2001 only (function removed in\n" " POSIX.1-2008)]\n" "gethostent()\n" "getlogin()\n" "getnetbyaddr()\n" "getnetbyname()\n" "getnetent()\n" "getopt()\n" "getprotobyname()\n" "getprotobynumber()\n" "getprotoent()\n" "getpwent()\n" "getpwnam()\n" "getpwuid()\n" "getservbyname()\n" "getservbyport()\n" "getservent()\n" "getutxent()\n" "getutxid()\n" "getutxline()\n" "gmtime()\n" "hcreate()\n" "hdestroy()\n" "hsearch()\n" "inet_ntoa()\n" "l64a()\n" "lgamma()\n" "lgammaf()\n" "lgammal()\n" "localeconv()\n" "localtime()\n" "lrand48()\n" "mrand48()\n" "nftw()\n" "nl_langinfo()\n" "ptsname()\n" "putc_unlocked()\n" "putchar_unlocked()\n" "putenv()\n" "pututxline()\n" "rand()\n" "readdir()\n" "setenv()\n" "setgrent()\n" "setkey()\n" "setpwent()\n" "setutxent()\n" "strerror()\n" "strsignal() [Added in POSIX.1-2008]\n" "strtok()\n" "system() [Added in POSIX.1-2008]\n" "tmpnam() if passed a non-NULL argument\n" "ttyname()\n" "unsetenv()\n" "wcrtomb() if its final argument is NULL\n" "wcsrtombs() if its final argument is NULL\n" "wcstombs()\n" "wctomb()\n" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Async-cancel-safe functions" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "An async-cancel-safe function is one that can be safely called in an " "application where asynchronous cancelability is enabled (see " "B(3))." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Only the following functions are required to be async-cancel-safe by " "POSIX.1-2001 and POSIX.1-2008:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "pthread_cancel()\n" "pthread_setcancelstate()\n" "pthread_setcanceltype()\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Cancelation points" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "POSIX.1 specifies that certain functions must, and certain other functions " "may, be cancelation points. If a thread is cancelable, its cancelability " "type is deferred, and a cancelation request is pending for the thread, then " "the thread is canceled when it calls a function that is a cancelation point." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following functions are required to be cancelation points by " "POSIX.1-2001 and/or POSIX.1-2008:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "accept()\n" "aio_suspend()\n" "clock_nanosleep()\n" "close()\n" "connect()\n" "creat()\n" "fcntl() F_SETLKW\n" "fdatasync()\n" "fsync()\n" "getmsg()\n" "getpmsg()\n" "lockf() F_LOCK\n" "mq_receive()\n" "mq_send()\n" "mq_timedreceive()\n" "mq_timedsend()\n" "msgrcv()\n" "msgsnd()\n" "msync()\n" "nanosleep()\n" "open()\n" "openat() [Added in POSIX.1-2008]\n" "pause()\n" "poll()\n" "pread()\n" "pselect()\n" "pthread_cond_timedwait()\n" "pthread_cond_wait()\n" "pthread_join()\n" "pthread_testcancel()\n" "putmsg()\n" "putpmsg()\n" "pwrite()\n" "read()\n" "readv()\n" "recv()\n" "recvfrom()\n" "recvmsg()\n" "select()\n" "sem_timedwait()\n" "sem_wait()\n" "send()\n" "sendmsg()\n" "sendto()\n" "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n" "sigsuspend()\n" "sigtimedwait()\n" "sigwait()\n" "sigwaitinfo()\n" "sleep()\n" "system()\n" "tcdrain()\n" "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n" "wait()\n" "waitid()\n" "waitpid()\n" "write()\n" "writev()\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following functions may be cancelation points according to POSIX.1-2001 " "and/or POSIX.1-2008:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "access()\n" "asctime()\n" "asctime_r()\n" "catclose()\n" "catgets()\n" "catopen()\n" "chmod() [Added in POSIX.1-2008]\n" "chown() [Added in POSIX.1-2008]\n" "closedir()\n" "closelog()\n" "ctermid()\n" "ctime()\n" "ctime_r()\n" "dbm_close()\n" "dbm_delete()\n" "dbm_fetch()\n" "dbm_nextkey()\n" "dbm_open()\n" "dbm_store()\n" "dlclose()\n" "dlopen()\n" "dprintf() [Added in POSIX.1-2008]\n" "endgrent()\n" "endhostent()\n" "endnetent()\n" "endprotoent()\n" "endpwent()\n" "endservent()\n" "endutxent()\n" "faccessat() [Added in POSIX.1-2008]\n" "fchmod() [Added in POSIX.1-2008]\n" "fchmodat() [Added in POSIX.1-2008]\n" "fchown() [Added in POSIX.1-2008]\n" "fchownat() [Added in POSIX.1-2008]\n" "fclose()\n" "fcntl() (for any value of cmd argument)\n" "fflush()\n" "fgetc()\n" "fgetpos()\n" "fgets()\n" "fgetwc()\n" "fgetws()\n" "fmtmsg()\n" "fopen()\n" "fpathconf()\n" "fprintf()\n" "fputc()\n" "fputs()\n" "fputwc()\n" "fputws()\n" "fread()\n" "freopen()\n" "fscanf()\n" "fseek()\n" "fseeko()\n" "fsetpos()\n" "fstat()\n" "fstatat() [Added in POSIX.1-2008]\n" "ftell()\n" "ftello()\n" "ftw()\n" "futimens() [Added in POSIX.1-2008]\n" "fwprintf()\n" "fwrite()\n" "fwscanf()\n" "getaddrinfo()\n" "getc()\n" "getc_unlocked()\n" "getchar()\n" "getchar_unlocked()\n" "getcwd()\n" "getdate()\n" "getdelim() [Added in POSIX.1-2008]\n" "getgrent()\n" "getgrgid()\n" "getgrgid_r()\n" "getgrnam()\n" "getgrnam_r()\n" "gethostbyaddr() [POSIX.1-2001 only (function removed in\n" " POSIX.1-2008)]\n" "gethostbyname() [POSIX.1-2001 only (function removed in\n" " POSIX.1-2008)]\n" "gethostent()\n" "gethostid()\n" "gethostname()\n" "getline() [Added in POSIX.1-2008]\n" "getlogin()\n" "getlogin_r()\n" "getnameinfo()\n" "getnetbyaddr()\n" "getnetbyname()\n" "getnetent()\n" "getopt() (if opterr is nonzero)\n" "getprotobyname()\n" "getprotobynumber()\n" "getprotoent()\n" "getpwent()\n" "getpwnam()\n" "getpwnam_r()\n" "getpwuid()\n" "getpwuid_r()\n" "gets()\n" "getservbyname()\n" "getservbyport()\n" "getservent()\n" "getutxent()\n" "getutxid()\n" "getutxline()\n" "getwc()\n" "getwchar()\n" "getwd() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n" "glob()\n" "iconv_close()\n" "iconv_open()\n" "ioctl()\n" "link()\n" "linkat() [Added in POSIX.1-2008]\n" "lio_listio() [Added in POSIX.1-2008]\n" "localtime()\n" "localtime_r()\n" "lockf() [Added in POSIX.1-2008]\n" "lseek()\n" "lstat()\n" "mkdir() [Added in POSIX.1-2008]\n" "mkdirat() [Added in POSIX.1-2008]\n" "mkdtemp() [Added in POSIX.1-2008]\n" "mkfifo() [Added in POSIX.1-2008]\n" "mkfifoat() [Added in POSIX.1-2008]\n" "mknod() [Added in POSIX.1-2008]\n" "mknodat() [Added in POSIX.1-2008]\n" "mkstemp()\n" "mktime()\n" "nftw()\n" "opendir()\n" "openlog()\n" "pathconf()\n" "pclose()\n" "perror()\n" "popen()\n" "posix_fadvise()\n" "posix_fallocate()\n" "posix_madvise()\n" "posix_openpt()\n" "posix_spawn()\n" "posix_spawnp()\n" "posix_trace_clear()\n" "posix_trace_close()\n" "posix_trace_create()\n" "posix_trace_create_withlog()\n" "posix_trace_eventtypelist_getnext_id()\n" "posix_trace_eventtypelist_rewind()\n" "posix_trace_flush()\n" "posix_trace_get_attr()\n" "posix_trace_get_filter()\n" "posix_trace_get_status()\n" "posix_trace_getnext_event()\n" "posix_trace_open()\n" "posix_trace_rewind()\n" "posix_trace_set_filter()\n" "posix_trace_shutdown()\n" "posix_trace_timedgetnext_event()\n" "posix_typed_mem_open()\n" "printf()\n" "psiginfo() [Added in POSIX.1-2008]\n" "psignal() [Added in POSIX.1-2008]\n" "pthread_rwlock_rdlock()\n" "pthread_rwlock_timedrdlock()\n" "pthread_rwlock_timedwrlock()\n" "pthread_rwlock_wrlock()\n" "putc()\n" "putc_unlocked()\n" "putchar()\n" "putchar_unlocked()\n" "puts()\n" "pututxline()\n" "putwc()\n" "putwchar()\n" "readdir()\n" "readdir_r()\n" "readlink() [Added in POSIX.1-2008]\n" "readlinkat() [Added in POSIX.1-2008]\n" "remove()\n" "rename()\n" "renameat() [Added in POSIX.1-2008]\n" "rewind()\n" "rewinddir()\n" "scandir() [Added in POSIX.1-2008]\n" "scanf()\n" "seekdir()\n" "semop()\n" "setgrent()\n" "sethostent()\n" "setnetent()\n" "setprotoent()\n" "setpwent()\n" "setservent()\n" "setutxent()\n" "sigpause() [Added in POSIX.1-2008]\n" "stat()\n" "strerror()\n" "strerror_r()\n" "strftime()\n" "symlink()\n" "symlinkat() [Added in POSIX.1-2008]\n" "sync()\n" "syslog()\n" "tmpfile()\n" "tmpnam()\n" "ttyname()\n" "ttyname_r()\n" "tzset()\n" "ungetc()\n" "ungetwc()\n" "unlink()\n" "unlinkat() [Added in POSIX.1-2008]\n" "utime() [Added in POSIX.1-2008]\n" "utimensat() [Added in POSIX.1-2008]\n" "utimes() [Added in POSIX.1-2008]\n" "vdprintf() [Added in POSIX.1-2008]\n" "vfprintf()\n" "vfwprintf()\n" "vprintf()\n" "vwprintf()\n" "wcsftime()\n" "wordexp()\n" "wprintf()\n" "wscanf()\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "An implementation may also mark other functions not specified in the " "standard as cancelation points. In particular, an implementation is likely " "to mark any nonstandard function that may block as a cancelation point. " "(This includes most functions that can touch files.)" msgstr "" #. So, scanning "cancelation point" comments in the glibc 2.8 header #. files, it looks as though at least the following nonstandard #. functions are cancelation points: #. endnetgrent #. endspent #. epoll_pwait #. epoll_wait #. fcloseall #. fdopendir #. fflush_unlocked #. fgetc_unlocked #. fgetgrent #. fgetgrent_r #. fgetpwent #. fgetpwent_r #. fgets_unlocked #. fgetspent #. fgetspent_r #. fgetwc_unlocked #. fgetws_unlocked #. fputc_unlocked #. fputs_unlocked #. fputwc_unlocked #. fputws_unlocked #. fread_unlocked #. fwrite_unlocked #. gai_suspend #. getaddrinfo_a #. getdate_r #. getgrent_r #. getgrouplist #. gethostbyaddr_r #. gethostbyname2 #. gethostbyname2_r #. gethostbyname_r #. gethostent_r #. getnetbyaddr_r #. getnetbyname_r #. getnetent_r #. getnetgrent #. getnetgrent_r #. getprotobyname_r #. getprotobynumber_r #. getprotoent_r #. getpw #. getpwent_r #. getservbyname_r #. getservbyport_r #. getservent_r #. getspent #. getspent_r #. getspnam #. getspnam_r #. getutmp #. getutmpx #. getw #. getwc_unlocked #. getwchar_unlocked #. initgroups #. innetgr #. mkostemp #. mkostemp64 #. mkstemp64 #. ppoll #. pthread_timedjoin_np #. putgrent #. putpwent #. putspent #. putw #. putwc_unlocked #. putwchar_unlocked #. rcmd #. rcmd_af #. rexec #. rexec_af #. rresvport #. rresvport_af #. ruserok #. ruserok_af #. setnetgrent #. setspent #. sgetspent #. sgetspent_r #. updwtmpx #. utmpxname #. vfscanf #. vfwscanf #. vscanf #. vsyslog #. vwscanf #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "It should be noted that even if an application is not using asynchronous " "cancelation, that calling a function from the above list from an " "asynchronous signal handler may cause the equivalent of asynchronous " "cancelation. The underlying user code may not expect asynchronous " "cancelation and the state of the user data may become inconsistent. " "Therefore signals should be used with caution when entering a region of " "deferred cancelation." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Compiling on Linux" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "On Linux, programs that use the Pthreads API should be compiled using I." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Linux implementations of POSIX threads" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Over time, two threading implementations have been provided by the GNU C " "library on Linux:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This is the original Pthreads implementation. Since glibc 2.4, this " "implementation is no longer supported." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B (Native POSIX Threads Library)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This is the modern Pthreads implementation. By comparison with " "LinuxThreads, NPTL provides closer conformance to the requirements of the " "POSIX.1 specification and better performance when creating large numbers of " "threads. NPTL is available since glibc 2.3.2, and requires features that " "are present in the Linux 2.6 kernel." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Both of these are so-called 1:1 implementations, meaning that each thread " "maps to a kernel scheduling entity. Both threading implementations employ " "the Linux B(2) system call. In NPTL, thread synchronization " "primitives (mutexes, thread joining, and so on) are implemented using the " "Linux B(2) system call." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LinuxThreads" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The notable features of this implementation are the following:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In addition to the main (initial) thread, and the threads that the program " "creates using B(3), the implementation creates a \"manager\" " "thread. This thread handles thread creation and termination. (Problems can " "result if this thread is inadvertently killed.)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Signals are used internally by the implementation. On Linux 2.2 and later, " "the first three real-time signals are used (see also B(7)). On " "older Linux kernels, B and B are used. Applications must " "avoid the use of whichever set of signals is employed by the implementation." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Threads do not share process IDs. (In effect, LinuxThreads threads are " "implemented as processes which share more information than usual, but which " "do not share a common process ID.) LinuxThreads threads (including the " "manager thread) are visible as separate processes using B(1)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The LinuxThreads implementation deviates from the POSIX.1 specification in a " "number of ways, including the following:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Calls to B(2) return a different value in each thread." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Calls to B(2) in threads other than the main thread return the " "process ID of the manager thread; instead B(2) in these threads " "should return the same value as B(2) in the main thread." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "When one thread creates a new child process using B(2), any thread " "should be able to B(2) on the child. However, the implementation " "allows only the thread that created the child to B(2) on it." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "When a thread calls B(2), all other threads are terminated (as " "required by POSIX.1). However, the resulting process has the same PID as " "the thread that called B(2): it should have the same PID as the main " "thread." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Threads do not share user and group IDs. This can cause complications with " "set-user-ID programs and can cause failures in Pthreads functions if an " "application changes its credentials using B(2) or similar." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Threads do not share a common session ID and process group ID." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Threads do not share record locks created using B(2)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The information returned by B(2) and B(2) is per-thread " "rather than process-wide." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Threads do not share semaphore undo values (see B(2))." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Threads do not share interval timers." msgstr "" #. FIXME . bug report filed for NPTL nice nonconformance #. http://bugzilla.kernel.org/show_bug.cgi?id=6258 #. Sep 08: there is a patch by Denys Vlasenko to address this #. "make setpriority POSIX compliant; introduce PRIO_THREAD extension" #. Monitor this to see if it makes it into mainline. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Threads do not share a common nice value." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "POSIX.1 distinguishes the notions of signals that are directed to the " "process as a whole and signals that are directed to individual threads. " "According to POSIX.1, a process-directed signal (sent using B(2), for " "example) should be handled by a single, arbitrarily selected thread within " "the process. LinuxThreads does not support the notion of process-directed " "signals: signals may be sent only to specific threads." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Threads have distinct alternate signal stack settings. However, a new " "thread's alternate signal stack settings are copied from the thread that " "created it, so that the threads initially share an alternate signal stack. " "(A new thread should start with no alternate signal stack defined. If two " "threads handle signals on their shared alternate signal stack at the same " "time, unpredictable program failures are likely to occur.)" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NPTL" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "With NPTL, all of the threads in a process are placed in the same thread " "group; all members of a thread group share the same PID. NPTL does not " "employ a manager thread." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "NPTL makes internal use of the first two real-time signals; these signals " "cannot be used in applications. See B(7) for further details." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "NPTL still has at least one nonconformance with POSIX.1:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Some NPTL nonconformances occur only with older kernels:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The information returned by B(2) and B(2) is per-thread " "rather than process-wide (fixed in Linux 2.6.9)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Threads do not share resource limits (fixed in Linux 2.6.10)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Threads do not share interval timers (fixed in Linux 2.6.12)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Only the main thread is permitted to start a new session using B(2) " "(fixed in Linux 2.6.16)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Only the main thread is permitted to make the process into a process group " "leader using B(2) (fixed in Linux 2.6.16)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Threads have distinct alternate signal stack settings. However, a new " "thread's alternate signal stack settings are copied from the thread that " "created it, so that the threads initially share an alternate signal stack " "(fixed in Linux 2.6.16)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Note the following further points about the NPTL implementation:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If the stack size soft resource limit (see the description of " "B in B(2)) is set to a value other than " "I, then this value defines the default stack size for new " "threads. To be effective, this limit must be set before the program is " "executed, perhaps using the I shell built-in command (I in the C shell)." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Determining the threading implementation" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Since glibc 2.3.2, the B(1) command can be used to determine the " "system's threading implementation, for example:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "bash$ getconf GNU_LIBPTHREAD_VERSION\n" "NPTL 2.3.4\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "With older glibc versions, a command such as the following should be " "sufficient to determine the default threading implementation:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "bash$ $( ldd /bin/ls | grep libc.so | awk \\[aq]{print $3}\\[aq] ) | \\e\n" " egrep -i \\[aq]threads|nptl\\[aq]\n" " Native POSIX Threads Library by Ulrich Drepper et al\n" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Selecting the threading implementation: LD_ASSUME_KERNEL" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., " "glibc 2.3.I), the B environment variable can be used to " "override the dynamic linker's default choice of threading implementation. " "This variable tells the dynamic linker to assume that it is running on top " "of a particular kernel version. By specifying a kernel version that does " "not provide the support required by NPTL, we can force the use of " "LinuxThreads. (The most likely reason for doing this is to run a (broken) " "application that depends on some nonconformant behavior in LinuxThreads.) " "For example:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n" " awk \\[aq]{print $3}\\[aq] ) | egrep -i \\[aq]threads|nptl\\[aq]\n" " linuxthreads-0.10 by Xavier Leroy\n" msgstr "" #. 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 "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "B(2), B(2), B(2), B(2), B(5), " "B(7), B(7), B(7), B(3type), B(7)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Various Pthreads manual pages, for example: B(3), " "B(3), B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), " "B(3), B(3), " "B(3), B(3), B(3), " "and B(3)" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "2023-02-05" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "" #. type: SS #: debian-bookworm #, no-wrap msgid "Cancellation points" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 msgid "" "B(2), B(2), B(2), B(2), B(5), " "B(7), B(7), B(7), B(7), B(7)" msgstr "" #. type: TH #: fedora-40 fedora-rawhide mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-18" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr "" #. type: TH #: opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr ""