2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2015 Joyent, Inc.
15 .Dt PROC_LWP_IN_SET 3PROC
19 .Nm proc_lwp_range_valid
20 .Nd test and validate thread ranges
29 .Fo proc_lwp_range_valid
36 .Fn proc_lwp_range_valid
37 functions provide means for testing the validity of thread ranges and
38 whether a thread is in a range.
40 A thread range is a series of one or more series of range identifiers
41 which describe a collection of threads.
42 These are often used by programs such as
47 and others as a means for a user to specify a selection of threads from
50 More formally, the thread range may be described as:
51 .Bd -literal -offset indent
52 lwp_range[,lwp_range]*
55 An LWP range may be specified as one of the following four strings.
56 The following table shows the string formats and the corresponding set of
57 valid threads that match it:
58 .Bl -column -offset indent ".Sy n-m" "n <= lwpid <= m"
59 .It Sy -n Ta lwpid <= n
60 .It Sy n-m Ta n <= lwpid <= m
61 .It Sy n- Ta lwpid >= n
62 .It Sy n Ta lwpid == n
65 For example, the thread range
67 matches thread with IDs 0-2, 4-5, 7, and any thread id 8 or greater.
70 .Fn proc_lwp_range_valid
71 function determines whether or not the character string
73 is a valid thread range based on the rules above.
74 Note, the empty string, the
76 pointer, or otherwise are not valid.
80 function determines whether the thread identifier
82 is contained in the set described by
88 pointer, then every thread matches the set.
90 Upon successful completion, the
100 is returned to indicate that
105 Upon successful completion, the
106 .Fa proc_lwp_range_valid
114 is returned to indicate that the set is invalid.
115 .Sh INTERFACE STABILITY