Web | This Site

Unix for Beginners
Unix Shell Programming
Advanced Unix
Unix Useful References
Unix Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# arch_prctl() - Unix, Linux System Call

# NAME

arch_prctl - set architecture specific thread state

# SYNOPSIS

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

    int arch_prctl(int code, unsigned long addr)

# DESCRIPTION

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.

# ERRORS

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.

# AUTHOR

Man page written by Andi Kleen.

# CONFORMING TO

arch_prctl() is a Linux/x86-64 extension and should not be used in programs intended to be portable.

# SEE ALSO

- mmap (2)

- modify_ldt (2)

- prctl (2)

- set_thread_area (2)

Advertisement

Online Image Processing

Indian Baby Names