Unix-system-calls-modify-ldt

提供:Dev Guides
移動先:案内検索

[top]#

|http://www.google.com/[Google] | a|

Web This Site
  • 初心者向けのUnix *
  • 高度なUnix *

選択した読書

Copyright©2014 by finddevguides

[cols=",,,,,,,",]

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

[width="100%",cols="100%",]

a| == modify_ldt()-Unix、Linuxシステムコール

[[File:]] image :http://www.finddevguides.com/images/next.gif [next] image:http://www.finddevguides.com/add- this.gif [AddThisソーシャルブックマークボタン]

広告

NAME

modify_ldt-ldtの取得または設定

概要

#include <sys/types.h> int modify_ldt(int func, void* ptr, unsigned long bytecount);

説明

*modify_ldt* ()は、プロセスのローカル記述子テーブル(ldt)を読み書きします。 ldtは、i386プロセッサが使用するプロセスごとのメモリ管理テーブルです。 この表の詳細については、Intel 386プロセッサハンドブックを参照してください。

_func_が0の場合、 modify_ldt ()は、_ptr_が指すメモリにldtを読み込みます。 読み取られるバイト数は、_bytecount_とldtの実際のサイズのうち小さい方です。

_func_が1の場合、 modify_ldt ()は1つのldtエントリを変更します。 _ptr_は_modify_ldt_ldt_s_構造体を指し、_bytecount_はこの構造体のサイズと等しくなければなりません。

返り値

成功した場合、 modify_ldt ()は、読み取られた実際のバイト数(読み取りの場合)または0(書き込みの場合)を返します。 失敗すると、 modify_ldt ()は-1を返し、_errno_を設定します。

エラー

Tag Description
EFAULT ptr points outside the address space.
EINVAL ptr is 0, or func is 1 and bytecount is not equal to the size of the structure modify_ldt_ldt_s, or func is 1 and the new ldt entry has invalid values.
*ENOSYS * func is neither 0 nor 1.

準拠

この呼び出しはLinux固有であり、移植性を目的としたプログラムでは使用しないでください。

ノート

Glibcはこのシステムコールのラッパーを提供しません。* syscall *(2)を使用して呼び出します。

関連項目

[[File:]] image :http://www.finddevguides.com/images/next.gif [next] [[File:]]

広告

|  

[cols="^",]

|Advertisements