mirror of https://github.com/mkerrisk/man-pages
modify_ldt.2: Use syscall(SYS_...); for system calls without a wrapper
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
0eefb56c95
commit
57d2facb78
|
@ -27,11 +27,19 @@
|
||||||
modify_ldt \- get or set a per-process LDT entry
|
modify_ldt \- get or set a per-process LDT entry
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.BI "int modify_ldt(int " func ", void *" ptr ", unsigned long " bytecount );
|
.BR "#include <asm/ldt.h>" " /* Definition of " "struct user_desc" " */"
|
||||||
|
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||||
|
.B #include <unistd.h>
|
||||||
|
.PP
|
||||||
|
.BI "int syscall(SYS_modify_ldt, int " func ", void *" ptr ,
|
||||||
|
.BI " unsigned long " bytecount );
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
.IR Note :
|
.IR Note :
|
||||||
There is no glibc wrapper for this system call; see NOTES.
|
glibc provides no wrapper for
|
||||||
|
.BR modify_ldt (),
|
||||||
|
necessitating the use of
|
||||||
|
.BR syscall (2).
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.BR modify_ldt ()
|
.BR modify_ldt ()
|
||||||
reads or writes the local descriptor table (LDT) for a process.
|
reads or writes the local descriptor table (LDT) for a process.
|
||||||
|
@ -168,9 +176,6 @@ is neither 0, 1, 2, nor 0x11.
|
||||||
This call is Linux-specific and should not be used in programs intended
|
This call is Linux-specific and should not be used in programs intended
|
||||||
to be portable.
|
to be portable.
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
Glibc does not provide a wrapper for this system call; call it using
|
|
||||||
.BR syscall (2).
|
|
||||||
.PP
|
|
||||||
.BR modify_ldt ()
|
.BR modify_ldt ()
|
||||||
should not be used for thread-local storage, as it slows down context
|
should not be used for thread-local storage, as it slows down context
|
||||||
switches and only supports a limited number of threads.
|
switches and only supports a limited number of threads.
|
||||||
|
|
Loading…
Reference in New Issue