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的擴展,並且不應該被用在程序準備移植。