Copyright © tutorialspoint.com
arch_prctl - set architecture specific thread state
#include <asm/prctl.h> #include <sys/prctl.h> |
The arch_prctl() function sets architecture specific process or thread state. code selects a subfunction and passes argument addr to it.
Sub functions for x86-64 are:
Tag | Description |
---|---|
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 address parameter. |
Tag | Description |
---|---|
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() is a Linux/x86-64 extension and should not be used in programs intended to be portable.
Copyright © tutorialspoint.com