名称
arch_prctl - 设置架构特定的线程状态
内容简介
#include <asm/prctl.h> #include <sys/prctl.h> int arch_prctl(int code, unsigned long addr) |
描述
arch_prctl()%uA0函数设置架构的具体进程或线程状态。代码选择一个子功能和参数地址传递给它。
x86-64的子函数是:
标签 | 描述 |
---|---|
ARCH_SET_FS | Set the 64bit base for the%uA0FS%uA0register toaddr. |
ARCH_GET_FS | Return the 64bit base value for theFS%uA0register of the current thread in theunsigned long%uA0pointed to by the%uA0address%uA0parameter |
ARCH_SET_GS | Set the 64bit base for the%uA0GS%uA0register to%uA0addr. |
ARCH_GET_GS | Return the 64bit base value for the%uA0GS%uA0register of the current thread in the%uA0unsigned long%uA0pointed to by the%uA0addressparameter. |
错误
标签 | 描述 |
---|---|
EFAULT | addr%uA0points to an unmapped address or is outside the process address space. |
EINVAL | code%uA0is not a valid subcommand. |
EPERM | addr%uA0is outside the process address space. |
作者
Man page written by Andi Kleen.
遵循于
arch_prctl()%uA0是一个Linux/x86-64的扩展,并且不应该被用在程序准备移植。