.\" -*- coding: UTF-8 -*- .\" Copyright 2003 Abhijit Menon-Sen .\" and Copyright (C) 2008 Michael Kerrisk .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH gettid 2 "31 Octubre 2023" "Páginas de manual de Linux 6.06" .SH NOMBRE gettid \- obtiene el identificador de hilo .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#define _GNU_SOURCE\fP \fB#include \fP .P \fBpid_t gettid(void);\fP .fi .SH DESCRIPCIÓN \fBgettid\fP() returns the caller's thread ID (TID). In a single\-threaded process, the thread ID is equal to the process ID (PID, as returned by \fBgetpid\fP(2)). In a multithreaded process, all threads have the same PID, but each one has a unique TID. For further details, see the discussion of \fBCLONE_THREAD\fP in \fBclone\fP(2). .SH "VALOR DEVUELTO" Si no sucede ningún error, se devuelve el ID del hilo invocante. .SH ERRORES Esta llamada nunca devuelve error. .SH ESTÁNDARES Linux. .SH HISTORIAL Linux 2.4.11, glibc 2.30. .SH NOTAS The thread ID returned by this call is not the same thing as a POSIX thread ID (i.e., the opaque value returned by \fBpthread_self\fP(3)). .P In a new thread group created by a \fBclone\fP(2) call that does not specify the \fBCLONE_THREAD\fP flag (or, equivalently, a new process created by \fBfork\fP(2)), the new process is a thread group leader, and its thread group ID (the value returned by \fBgetpid\fP(2)) is the same as its thread ID (the value returned by \fBgettid\fP()). .SH "VÉASE TAMBIÉN" .\" .BR kcmp (2), .\" .BR move_pages (2), .\" .BR migrate_pages (2), .\" .BR process_vm_readv (2), .\" .BR ptrace (2), \fBcapget\fP(2), \fBclone\fP(2), \fBfcntl\fP(2), \fBfork\fP(2), \fBget_robust_list\fP(2), \fBgetpid\fP(2), \fBioprio_set\fP(2), \fBperf_event_open\fP(2), \fBsched_setaffinity\fP(2), \fBsched_setparam\fP(2), \fBsched_setscheduler\fP(2), \fBtgkill\fP(2), \fBtimer_create\fP(2) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Miguel Pérez Ibars y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .