Unix for Beginners
Unix Shell Programming
Unix Useful References
Unix Useful Resources
© 2013 TutorialsPoint.COM
arch_prctl() - Unix, Linux System Call
arch_prctl - set architecture specific thread state
int arch_prctl(int code, unsigned long addr)
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:
|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. |
|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.