
- Linux System Calls
- Linux System Calls - Home
- A
- accept
- access
- acct
- add_key
- adjtimex
- afs_syscall
- alarm
- alloc_hugepages
- arch_prctl
- B
- bdflush
- bind
- break
- brk
- C
- cacheflush
- chdir
- chmod
- chown
- chroot
- clone2
- clone
- close
- connect
- create_module
- creat
- D
- dup2
- dup
- E
- epoll_create
- epoll_ctl
- epoll_wait
- execve
- exit_group
- _exit
- exit
- _Exit
- F
- faccessat
- fattch
- fchdir
- fchmodat
- fchmod
- fchownat
- fchown
- fcntl
- fdatasync
- fdetach
- flock
- fork
- free_hugepages
- fstatat
- fstatfs
- fstat
- fstatvfs
- fsync
- ftruncate
- futex
- futimesat
- G
- getcontext
- getcwd
- getdents
- getdomainname
- getdtablesize
- getegid
- geteuid
- getgid
- getgroups
- gethostid
- gethostname
- getitimer
- get_kernel_syms
- get_mempolicy
- getmsg
- getpagesize
- getpeername
- getpgid
- getpgrp
- getpid
- getpmsg
- getppid
- getpriority
- getresgid
- getresuid
- getrlimit
- get_robust_list
- getrusage
- getsid
- getsockname
- getsockopt
- get_thread_area
- gettid
- gettimeofday
- getuid
- getunwind
- gtty
- I
- idle
- inb
- inb_p
- init_module
- inl
- inl_p
- inotify_add_watch
- inotify_init
- inotify_rm_watch
- insb
- insl
- insw
- intro
- inw
- inw_p
- io_cancel
- ioctl
- ioctl_list
- io_destroy
- io_getevents
- ioperm
- iopl
- ioprio_get
- ioprio_set
- io_setup
- io_submit
- ipc
- isastream
- K
- kexec_load
- keyctl
- kill
- killpg
- L
- lchown
- linkat
- link
- listen
- _llseek
- llseek
- lock
- lookup_dcookie
- lseek
- lstat
- M
- madvise
- mincore
- mkdirat
- mkdir
- mknodat
- mknod
- mlockall
- mlock
- mmap2
- mmap
- modify_ldt
- mount
- move_pages
- mprotect
- mpx
- mq_getsetattr
- mremap
- msgctl
- msgget
- msgop
- msgrcv
- msgsnd
- msync
- multiplexer
- munlockall
- munlock
- munmap
- N
- nanosleep
- _newselect
- nfsservctl
- nice
- O
- obsolete
- oldfstat
- oldlstat
- oldolduname
- oldstat
- olduname
- openat
- open
- outb
- outb_p
- outl
- outl_p
- outsb
- outsl
- outsw
- outw
- outw_p
- P
- path_resolution
- pause
- perfmonctl
- personality
- pipe
- pivot_root
- poll
- posix_fadvise
- ppoll
- prctl
- pread
- prof
- pselect
- ptrace
- putmsg
- putpmsg
- pwrite
- Q
- query_module
- quotactl
- R
- readahead
- readdir
- read
- readlinkat
- readlink
- readv
- reboot
- recvfrom
- recv
- recvmsg
- remap_file_pages
- renameat
- rename
- request_key
- restart_syscall
- rmdir
- rtas
- rt_sigaction
- rt_sigpending
- rt_sigprocmask
- rt_sigqueueinfo
- rt_sigreturn
- rt_sigsuspend
- rt_sigtimedwait
- S
- sbrk
- sched_getaffinity
- sched_getparam
- sched_get_priority_max
- sched_get_priority_min
- sched_getscheduler
- sched_rr_get_interval
- sched_setaffinity
- sched_setparam
- sched_setscheduler
- sched_yield
- security
- select
- select_tut
- semctl
- semget
- semop
- semtimedop
- sendfile
- send
- sendmsg
- sendto
- setcontext
- setdomainname
- setegid
- seteuid
- setfsgid
- setfsuid
- setgid
- setgroups
- sethostid
- sethostname
- setitimer
- setpgid
- setpgrp
- setpriority
- setregid
- setresgid
- setresuid
- setreuid
- setrlimit
- set_robust_list
- setsid
- setsockopt
- set_thread_area
- set_tid_address
- settimeofday
- setuid
- setup
- sgetmask
- shmat
- shmctl
- shmdt
- shmget
- shmop
- shutdown
- sigaction
- sigaltstack
- signal
- sigpending
- sigprocmask
- sigqueue
- sigreturn
- sigsuspend
- sigtimedwait
- sigwaitinfo
- socketcall
- socket
- socketpair
- splice
- spu_create
- spufs
- spu_run
- ssetmask
- statfs64
- statfs
- stat
- statvfs
- stime
- stty
- swapcontext
- swapoff
- swapon
- symlinkat
- symlink
- sync_file_range
- sync
- _syscall
- syscall
- syscalls
- _sysctl
- sysctl
- sysfs
- sysinfo
- syslog
- T
- tee
- tgkill
- time
- timer_create
- timer_delete
- timer_getoverrun
- timer_gettime
- timer_settime
- times
- tkill
- truncate
- tux
- U
- umask
- umount2
- umount
- uname
- undocumented
- unimplemented
- unlinkat
- unlink
- unshare
- uselib
- ustat
- utime
- utimes
- V
- vfork
- vhangup
- vm86
- vm86old
- vmsplice
- vserver
- W
- wait3
- wait4
- wait
- waitid
- waitpid
- write
- writev
modify_ldt() System Call in Linux
NAME
modify_ldt - get or set ldtSYNOPSIS
#include <sys/types.h> |
DESCRIPTION
modify_ldt() reads or writes the local descriptor table (ldt) for a process. The ldt is a per-process memory management table used by the i386 processor. For more information on this table, see an Intel 386 processor handbook.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_s structure and bytecount must equal the size of this structure.
RETURN VALUE
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.ERRORS
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. |
CONFORMING TO
This call is Linux specific and should not be used in programs intended to be portable.NOTES
Glibc does not provide a wrapper for this system call; call it using syscall(2).SEE ALSO
Advertisements