Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Pldt.3proc.man.txt
+++ new/usr/src/man/man3proc/Pldt.3proc.man.txt
1 1 PLDT(3PROC) Process Control Library Functions PLDT(3PROC)
2 2
3 3 NAME
4 4 Pldt, proc_get_ldt - obtain local descriptor table of a process
5 5
6 -SYNOPSIS
6 +LIBRARY
7 7 Process Control Library (libproc, -lproc)
8 +
9 +SYNOPSIS
8 10 #include <libproc.h>
9 11
10 12 int
11 13 Pldt(struct ps_prochandle *P, struct ssd *pldt, int nldt);
12 14
13 15 int
14 16 proc_get_ldt(pid_t pid, struct ssd *pldt, int nldt);
15 17
16 18 DESCRIPTION
17 19 The Pldt() function reads the local descriptor table (LDT) of the process
18 20 handle P into the buffer pldt. Up to nldt entries will be read.
19 21
20 22 If either pldt is NULL or nldt is 0, then rather than filling in pldt,
21 23 only the number of entries currently in the LDT is returned.
22 24
23 25 The buffer pldt should contain sufficient space for nldt entries. For
24 26 example, callers could allocate space as:
25 27
26 28 pldt = malloc(sizeof (struct ssd) * nldt);
27 29
28 30 For more information on the LDT and the struct ssd, see proc(4).
29 31
30 32 The proc_get_ldt() function is similar to the Pldt() function; however,
31 33 rather than reading from a process handle, it reads the ldt file from the
32 34 /proc file system for the process pid.
33 35
34 36 RETURN VALUES
35 37 Upon successful completion, the Pldt() and proc_get_ldt() functions
36 38 return the number of LDT entries written to pldt. If pldt is NULL or
37 39 nldt is zero, then no data will be written. Otherwise, -1 is returned.
38 40 The Pldt() function sets errno to indicate the error that occurred.
39 41
40 42 ERRORS
41 43 For a full list of possible errors see the DIAGNOSTICS section in
42 44 proc(4).
43 45
44 46 The Pldt() function will fail if:
45 47
46 48 ENODATA No LDT information is available in the process handle
47 49 P.
48 50
49 51 ARCHITECTURE
50 52 The Pldt() and proc_get_ldt() functions are only available on x86
51 53 platforms.
52 54
53 55 INTERFACE STABILITY
54 56 Uncommitted
55 57
56 58 MT-LEVEL
57 59 See LOCKING in libproc(3LIB).
58 60
59 61 SEE ALSO
60 62 libproc(3LIB), proc(4)
61 63
62 64 illumos May 11, 2016 illumos
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX