.Dt PTHREAD_SCHEDPARAM 3
.Os
.Sh NAME
-.Nm pthread_setschedparam ,
-.Nm pthread_getschedparam
+.Nm pthread_getschedparam ,
+.Nm pthread_setschedparam
.Nd thread scheduling parameter manipulation
.Sh SYNOPSIS
.Fd #include <pthread.h>
.Ft int
-.Fn pthread_setschedparam "pthread_t thread" "int policy" "const struct sched_param *param"
+.Fo pthread_getschedparam
+.Fa "pthread_t thread"
+.Fa "int *restrict policy"
+.Fa "struct sched_param *restrict param"
+.Fc
.Ft int
-.Fn pthread_getschedparam "pthread_t thread" "int *policy" "struct sched_param *param"
+.Fo pthread_setschedparam
+.Fa "pthread_t thread"
+.Fa "int policy"
+.Fa "const struct sched_param *param"
+.Fc
.Sh DESCRIPTION
The
-.Fn pthread_setschedparam
-and
.Fn pthread_getschedparam
-functions set and get the scheduling parameters of individual threads.
+and
+.Fn pthread_setschedparam
+functions get and set the scheduling parameters of individual threads.
The scheduling policy for a thread can either be
.Dv SCHED_FIFO
(first in, first out) or
If successful, these functions return 0.
Otherwise, an error number is returned to indicate the error.
.Sh ERRORS
-.Fn pthread_setschedparam
+.Fn pthread_getschedparam
will fail if:
.Bl -tag -width Er
-.It Bq Er EINVAL
-Invalid value for
-.Va policy .
-.It Bq Er ENOTSUP
-Invalid value for scheduling parameters.
.It Bq Er ESRCH
Non-existent thread
.Va thread .
.El
.Pp
-.Fn pthread_getschedparam
+.Fn pthread_setschedparam
will fail if:
.Bl -tag -width Er
+.It Bq Er EINVAL
+Invalid value for
+.Va policy .
+.It Bq Er ENOTSUP
+Invalid value for scheduling parameters.
.It Bq Er ESRCH
Non-existent thread
.Va thread .