xref: /illumos-gate/usr/src/man/man3c/posix_spawnattr_getschedparam.3c (revision e8d3efa1c56e5f2b5368600a2baeb7b1d54a07f8)
1.\"
2.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3.\" permission to reproduce portions of its copyrighted documentation.
4.\" Original documentation from The Open Group can be obtained online at
5.\" http://www.opengroup.org/bookstore/.
6.\"
7.\" The Institute of Electrical and Electronics Engineers and The Open
8.\" Group, have given us permission to reprint portions of their
9.\" documentation.
10.\"
11.\" In the following statement, the phrase ``this text'' refers to portions
12.\" of the system documentation.
13.\"
14.\" Portions of this text are reprinted and reproduced in electronic form
15.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16.\" Standard for Information Technology -- Portable Operating System
17.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19.\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20.\" between these versions and the original IEEE and The Open Group
21.\" Standard, the original IEEE and The Open Group Standard is the referee
22.\" document.  The original Standard can be obtained online at
23.\" http://www.opengroup.org/unix/online.html.
24.\"
25.\" This notice shall appear on any product containing this material.
26.\"
27.\" The contents of this file are subject to the terms of the
28.\" Common Development and Distribution License (the "License").
29.\" You may not use this file except in compliance with the License.
30.\"
31.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32.\" or http://www.opensolaris.org/os/licensing.
33.\" See the License for the specific language governing permissions
34.\" and limitations under the License.
35.\"
36.\" When distributing Covered Code, include this CDDL HEADER in each
37.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38.\" If applicable, add the following below this CDDL HEADER, with the
39.\" fields enclosed by brackets "[]" replaced with your own identifying
40.\" information: Portions Copyright [yyyy] [name of copyright owner]
41.\"
42.\"
43.\" Copyright (c) 2001, The IEEE and The Open Group.  All Rights Reserved.
44.\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
45.\" Copyright 2026 Oxide Computer Company
46.\"
47.Dd July 4, 2026
48.Dt POSIX_SPAWNATTR_GETSCHEDPARAM 3C
49.Os
50.Sh NAME
51.Nm posix_spawnattr_getschedparam ,
52.Nm posix_spawnattr_setschedparam
53.Nd get and set spawn-schedparam attribute of spawn attributes object
54.Sh LIBRARY
55.Lb libc
56.Sh SYNOPSIS
57.In spawn.h
58.In sched.h
59.Ft int
60.Fo posix_spawnattr_getschedparam
61.Fa "const posix_spawnattr_t *restrict attr"
62.Fa "struct sched_param *restrict schedparam"
63.Fc
64.Ft int
65.Fo posix_spawnattr_setschedparam
66.Fa "posix_spawnattr_t *restrict attr"
67.Fa "const struct sched_param *restrict schedparam"
68.Fc
69.Sh DESCRIPTION
70The
71.Fn posix_spawnattr_getschedparam
72function obtains the value of the spawn-schedparam attribute from the
73attributes object referenced by
74.Fa attr .
75.Pp
76The
77.Fn posix_spawnattr_setschedparam
78function sets the spawn-schedparam attribute in an initialized attributes
79object referenced by
80.Fa attr .
81.Pp
82The spawn-schedparam attribute represents the scheduling parameters to be
83assigned to the new process image in a spawn operation
84.Po
85if
86.Dv POSIX_SPAWN_SETSCHEDULER
87or
88.Dv POSIX_SPAWN_SETSCHEDPARAM
89is set in the spawn-flags attribute
90.Pc .
91The default value of this attribute is unspecified.
92.Sh RETURN VALUES
93Upon successful completion,
94.Fn posix_spawnattr_getschedparam
95returns 0 and stores the value of the spawn-schedparam attribute of
96.Fa attr
97into the object referenced by the
98.Fa schedparam
99parameter.
100Otherwise, an error number is returned to indicate the error.
101.Pp
102Upon successful completion,
103.Fn posix_spawnattr_setschedparam
104returns 0.
105Otherwise, an error number is returned to indicate the error.
106.Sh ERRORS
107These functions may fail if:
108.Bl -tag -width Er
109.It Er EINVAL
110The value specified by
111.Fa attr
112is invalid.
113.El
114.Pp
115The
116.Fn posix_spawnattr_setschedparam
117function may fail if:
118.Bl -tag -width Er
119.It Er EINVAL
120The value of the attribute being set is not valid.
121.El
122.Sh INTERFACE STABILITY
123.Sy Standard
124.Sh MT-LEVEL
125.Sy MT-Safe
126.Sh SEE ALSO
127.Xr posix_spawn 3C ,
128.Xr posix_spawnattr_destroy 3C ,
129.Xr posix_spawnattr_getflags 3C ,
130.Xr posix_spawnattr_getpgroup 3C ,
131.Xr posix_spawnattr_getschedpolicy 3C ,
132.Xr posix_spawnattr_getsigdefault 3C ,
133.Xr posix_spawnattr_getsigmask 3C ,
134.Xr attributes 7 ,
135.Xr standards 7
136.Sh STANDARDS
137The
138.Fn posix_spawnattr_getschedparam
139and
140.Fn posix_spawnattr_setschedparam
141functions conform to
142.St -p1003.1-2001 .
143