arch_prctl() - Unix、Linux 系統呼叫 - 技術教學
Tutorials Point


  Unix 初學者指南
  Unix Shell 程式設計
  高階 Unix
  Unix 有用參考
  Unix 有用資源
  精選閱讀

版權所有 © 2014 tutorialspoint



  首頁     參考     討論論壇     關於 TP  

arch_prctl() - Unix、Linux 系統呼叫


previous next AddThis Social Bookmark Button

廣告

名稱

arch_prctl - 設定體系結構特定的執行緒狀態

語法

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

int arch_prctl(int code, unsigned long addr)

描述

arch_prctl() 函式設定體系結構特定的程序或執行緒狀態。code 選擇一個子函式並將其引數 addr 傳遞給它。

x86-64 的子函式是

標籤描述
ARCH_SET_FS FS暫存器的 64 位基址設定為addr
ARCH_GET_FS 將當前執行緒的FS暫存器的 64 位基址值返回到address引數指向的unsigned long
ARCH_SET_GS GS暫存器的 64 位基址設定為addr
ARCH_GET_GS 將當前執行緒的GS暫存器的 64 位基址值返回到address引數指向的unsigned long中。

錯誤

標籤描述
EFAULT addr指向一個未對映的地址或位於程序地址空間之外。
EINVAL code不是有效的子命令。
EPERM addr位於程序地址空間之外。

作者

手冊頁由 Andi Kleen 編寫。

符合標準

arch_prctl() 是 Linux/x86-64 擴充套件,不應在旨在可移植的程式中使用。

參見



previous next Printer Friendly

廣告


  

廣告



廣告
© . All rights reserved.