arch_prctl() - Unix, Linux System Call
Tutorials Point


  Unix for Beginners
  Unix Shell Programming
  Advanced Unix
  Unix Useful References
  Unix Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

arch_prctl() - Unix, Linux System Call


previous next AddThis Social Bookmark Button

Advertisements

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:

TagDescription
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

TagDescription
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



previous next Printer Friendly

Advertisements


  

Advertisements



Advertisements