.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2003 Andi Kleen .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH ARCH_PRCTL 2 "11 Abril 2020" Linux "Manual del Programador de Linux" .SH NOMBRE arch_prctl \- fija el estado de un hilo para una arquitectura específica .SH SINOPSIS .nf \fB#include \fP \fB#include \fP .PP \fBint arch_prctl(int \fP\fIcode\fP\fB, unsigned long \fP\fIaddr\fP\fB);\fP \fBint arch_prctl(int \fP\fIcode\fP\fB, unsigned long *\fP\fIaddr\fP\fB);\fP .fi .SH DESCRIPCIÓN \fBarch_prctl\fP() sets architecture\-specific process or thread state. \fIcode\fP selects a subfunction and passes argument \fIaddr\fP to it; \fIaddr\fP is interpreted as either an \fIunsigned long\fP for the "set" operations, or as an \fIunsigned long\ *\fP, for the "get" operations. .PP Las subfunciones para la arquitectura x86\-64 y x86 son: .TP \fBARCH_SET_CPUID\fP (desde Linux 4.12) .\" commit e9ea1e7f53b852147cbd568b0568c7ad97ec21a3 Enable (\fIaddr != 0\fP) or disable (\fIaddr == 0\fP) the \fIcpuid\fP instruction for the calling thread. The instruction is enabled by default. If disabled, any execution of a \fIcpuid\fP instruction will instead generate a \fBSIGSEGV\fP signal. This feature can be used to emulate \fIcpuid\fP results that differ from what the underlying hardware would have produced (e.g., in a paravirtualization setting). .IP The \fBARCH_SET_CPUID\fP setting is preserved across \fBfork\fP(2) and \fBclone\fP(2) but reset to the default (i.e., \fIcpuid\fP enabled) on \fBexecve\fP(2). .TP \fBARCH_GET_CPUID\fP (desde Linux 4.12) Return the setting of the flag manipulated by \fBARCH_SET_CPUID\fP as the result of the system call (1 for enabled, 0 for disabled). \fIaddr\fP is ignored. .TP Las subfunciones para la arquitectura x86\-64 son: .TP \fBARCH_SET_FS\fP Establece la base de 64 bits para el registro \fIFS\fP a \fIaddr\fP. .TP \fBARCH_GET_FS\fP Devuelve el valor de base de 64 bits para el registro \fIFS\fP del hilo invocante en la variable \fIunsigned long\fP apuntada por \fIaddr\fP. .TP \fBARCH_SET_GS\fP Establece la base de 64 bits para el registro \fIGS\fP a \fIaddr\fP. .TP \fBARCH_GET_GS\fP Devuelve el valor de base 64 bits para el registro \fIGS\fP del hilo actual en la variable \fIunsigned long\fP apuntada por el parámetro \fIaddr\fP. .SH "VALOR DEVUELTO" En caso de éxito \fBarch_prctl\fP() devuelve cero. En caso de error se devuelve \-1, y \fIerrno\fP se define para indicar el tipo de error. .SH ERRORES .TP \fBEFAULT\fP \fIaddr\fP apunta a una dirección no asignada o que está fuera del espacio de direcciones del proceso. .TP \fBEINVAL\fP \fIcode\fP no es un subcomando válido. .TP \fBEPERM\fP \fIaddr\fP está fuera del espacio de direcciones. .TP \fBENODEV\fP .\" .SH AUTHOR .\" Man page written by Andi Kleen. Se solicitó \fBARCH_SET_CPUID\fP, pero el hardware subyacente no incluye soporte para error de CPUID. .SH "CONFORME A" \fBarch_prctl\fP() es una extensión de Linux/x86\-64 y no debería emplearse en programas que se pretenden que sean portables. .SH NOTAS En la actualidad \fBarch_prctl\fP() es soportada solamente por la plataforma Linux/x86\-64 para programas de 64 bits. .PP La base de 64 bits cambia cuando se carga un nuevo selector de segmento de 32 bits. .PP \fBARCH_SET_GS\fP está deshabilitado en algunos núcleos. .PP Context switches for 64\-bit segment bases are rather expensive. As an optimization, if a 32\-bit TLS base address is used, \fBarch_prctl\fP() may use a real TLS entry as if \fBset_thread_area\fP(2) had been called, instead of manipulating the segment base register directly. Memory in the first 2\ GB of address space can be allocated by using \fBmmap\fP(2) with the \fBMAP_32BIT\fP flag. .PP Because of the aforementioned optimization, using \fBarch_prctl\fP() and \fBset_thread_area\fP(2) in the same thread is dangerous, as they may overwrite each other's TLS entries. .PP As of version 2.7, glibc provides no prototype for \fBarch_prctl\fP(). You have to declare it yourself for now. This may be fixed in future glibc versions. .PP \fIFS\fP may be already used by the threading library. Programs that use \fBARCH_SET_FS\fP directly are very likely to crash. .SH "VÉASE TAMBIÉN" \fBmmap\fP(2), \fBmodify_ldt\fP(2), \fBprctl\fP(2), \fBset_thread_area\fP(2) .PP Manual del Programador de AMD X86\-64 .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .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 .