內容簡介
#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).另請參閱
上一篇:
mmap()函數 Unix/Linux
下一篇:
mount()函數 Unix/Linux