]> git.saurik.com Git - apple/libpthread.git/blame_incremental - man/pthread_attr_set_getschedpolicy.3
libpthread-301.1.6.tar.gz
[apple/libpthread.git] / man / pthread_attr_set_getschedpolicy.3
... / ...
CommitLineData
1.\" Copyright (c) 2004-2007 Apple Inc. All rights reserved.
2.Dd December 31, 2007
3.Dt PTHREAD_ATTR 3
4.Os
5.Sh NAME
6.Nm pthread_attr_getschedpolicy ,
7.Nm pthread_attr_setschedpolicy
8.Nd thread attribute operations
9.Sh SYNOPSIS
10.Fd #include <pthread.h>
11.Ft int
12.Fo pthread_attr_getschedpolicy
13.Fa "const pthread_attr_t *restrict attr"
14.Fa "int *restrict policy"
15.Fc
16.Ft int
17.Fo pthread_attr_setschedpolicy
18.Fa "pthread_attr_t *attr"
19.Fa "int policy"
20.Fc
21.Sh DESCRIPTION
22Thread attributes are used to specify parameters to
23.Fn pthread_create .
24One attribute object can be used in multiple calls to
25.Fn pthread_create ,
26with or without modifications between calls.
27.Pp
28The functions
29.Fn pthread_attr_setschedpolicy
30and
31.Fn pthread_attr_getschedpolicy ,
32set and get the attribute in the
33.Fa attr
34argument related to the scheduling policy.
35The value for the aforementioned attribute can be SCHED_FIFO, SCHED_RR and SCHED_OTHER.
36.Sh RETURN VALUES
37If successful, these functions return 0.
38Otherwise, an error number is returned to indicate the error.
39.Fn pthread_attr_getschedpolicy ,
40on success, will copy the value of the thread's scheduling policy attribute
41to the location pointed to by the second function parameter.
42.Sh ERRORS
43.Pp
44.Fn pthread_attr_getschedpolicy
45will fail if:
46.Bl -tag -width Er
47.\" ========
48.It Bq Er EINVAL
49Invalid value for
50.Fa attr .
51.El
52.Pp
53.Fn pthread_attr_setschedpolicy
54will fail if:
55.Bl -tag -width Er
56.\" ========
57.It Bq Er EINVAL
58Invalid value for
59.Fa attr .
60.It Bq Er ENOTSUP
61Invalid or unsupported value for
62.Fa policy .
63.El
64.Sh SEE ALSO
65.Xr pthread_create 3 ,
66.Xr pthread_attr_init 3 ,
67.Xr pthread_attr_setschedparam 3 ,
68.Xr pthread_attr_setinheritsched 3
69.Sh STANDARDS
70.Fn pthread_attr_setschedpolicy ,
71.Fn pthread_attr_getschedpolicy
72conform to
73.St -susv2