1thr_getprio(3C)          Standard C Library Functions          thr_getprio(3C)
2
3
4

NAME

6       thr_getprio, thr_setprio - access dynamic thread scheduling
7

SYNOPSIS

9       cc -mt [ flag... ] file...[ library... ]
10       #include <thread.h>
11
12       int thr_setprio(thread_t target_thread, int priority);
13
14
15       int thr_getprio(thread_t target_thread, int *priority);
16
17

DESCRIPTION

19       The  thr_setprio() function sets the scheduling priority for the thread
20       specified by target_thread within the  current  process  to  the  value
21       given by priority.
22
23
24       The  thr_getprio()  function stores the current priority for the thread
25       specified by target_thread in the location pointed to by priority.
26
27
28       If the thr_setprio() function fails, the  scheduling  priority  of  the
29       target thread is not changed.
30
31
32       See priocntl(2), pthread_setschedprio(3C), and sched_setparam(3C).
33

RETURN VALUES

35       If  successful, the thr_getprio() and thr_setprio() functions return 0.
36       Otherwise, an error number is returned to indicate the error.
37

ERRORS

39       The thr_getprio() and thr_setprio() functions will fail if:
40
41       ESRCH    The value specified by target_thread  does  not  refer  to  an
42                existing thread.
43
44
45
46       The  thr_setprio() function will fail if:
47
48       EINVAL    The value of priority is invalid for the scheduling policy of
49                 the specified thread.
50
51
52       EPERM     The caller does not have the appropriate  permission  to  set
53                 the priority to the value specified.
54
55

ATTRIBUTES

57       See attributes(5) for descriptions of the following attributes:
58
59
60
61
62       ┌─────────────────────────────┬─────────────────────────────┐
63       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
64       ├─────────────────────────────┼─────────────────────────────┤
65       │MT-Level                     │MT-Safe                      │
66       └─────────────────────────────┴─────────────────────────────┘
67

SEE ALSO

69       priocntl(2),   pthread_setschedprio(3C),  sched_setparam(3C),  thr_cre‐
70       ate(3C), thr_suspend(3C), thr_yield(3C), attributes(5), standards(5)
71
72
73
74SunOS 5.11                        1 Apr 2008                   thr_getprio(3C)
Impressum