内容简介
#include <sys/types.h> int modify_ldt(int func, void *ptr, unsigned long bytecount); |
描述
modify_ldt() 读取或一个进程写入本地描述符表(ldt)。 ldt 是使用i386处理器每个进程的内存管理表。对于该表的详细信息,请参阅英特尔386处理器手册。When func is 0, modify_ldt() reads the ldt into the memory pointed to by ptr. The number of bytes read is the smaller of bytecount and the actual size of the ldt.
When func is 1, modify_ldt() modifies one ldt entry. ptr points to a modify_ldt_ldt_sstructure and bytecount must equal the size of this structure.
返回值
On success, modify_ldt() returns either the actual number of bytes read (for reading) or 0 (for writing). On failure, modify_ldt() returns -1 and sets errno.错误
标签 | 描述 |
---|---|
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).另请参阅