arch_prctl()函式 Unix/Linux


名稱

arch_prctl - 設定架構特定的執行緒狀態

內容簡介

#include <asm/prctl.h>
#include <sys/prctl.h>

int arch_prctl(int code, unsigned long addr)

描述

arch_prctl() 函式設定架構的具體進程或執行緒狀態。程式碼選擇一個子功能和引數地址傳遞給它。

x86-64的子函式是:

標籤 描述
ARCH_SET_FS Set the 64bit base for the FS register toaddr.
ARCH_GET_FS Return the 64bit base value for theFS register of the current thread in theunsigned long pointed to by the address parameter
ARCH_SET_GS Set the 64bit base for the GS register to addr.
ARCH_GET_GS Return the 64bit base value for the GS register of the current thread in the unsigned long pointed to by the addressparameter.

錯誤

標籤 描述
EFAULT addr points to an unmapped address or is outside the process address space.
EINVAL code is not a valid subcommand.
EPERM addr is outside the process address space.

作者

Man page written by Andi Kleen.

遵循於

arch_prctl() 是一個Linux/x86-64的擴充套件,並且不應該被用在程式準備移植。

請另參閱