#include <sys/types.h> int modify_ldt(int func, void *ptr, unsigned long bytecount);
注: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。
func が 0 ならば、 modify_ldt() は ldt を ptr が指しているメモリーに読み込む。 読み込むバイト数は実際の ldt のサイズか bytecount より小さい方である。
func が 1 ならば、 modify_ldt() は ldt エントリーの一つを変更する。 ptr は user_desc 構造体を指し、 bytecount はこの構造体の大きさに等しくなければならない。
user_desc 構造体は <asm/ldt.h> で以下のように定義されている:
struct user_desc {
unsigned int entry_number;
unsigned long base_addr;
unsigned int limit;
unsigned int seg_32bit:1;
unsigned int contents:2;
unsigned int read_exec_only:1;
unsigned int limit_in_pages:1;
unsigned int seg_not_present:1;
unsigned int useable:1;
};
Linux 2.4 以前では、この構造体は modify_ldt_ldt_s という名前であった。
[man1]
[man2]
[man3]
[man4]
[man5]
[man6]
[man7]
[man8]
[a]
[b]
[c]
[d]
[e]
[f]
[g]
[h]
[i]
[j]
[k]
[l]
[m]
[n]
[o]
[p]
[q]
[r]
[s]
[t]
[u]
[v]
[w]
[x]
[y]
[z]