THREAD_SET_PRIORITY(3T) SysV THREAD_SET_PRIORITY(3T)
NAME
thread_set_priority - set values for scheduling priority.
SYNOPSIS
include <apollo/thread.h>
kern_return_t thread_set_priority(target_thread, minpri, maxpri)
thread_t target_thread;
unsigned short minpri;
unsigned short maxpri;
DESCRIPTION
thread_set_priority sets the minimum and maximum values for the
scheduling priority. The actual priority for the thread will fluctuate
between these two numbers, depending on how much CPU time it is using.
The arguments are as follows:
target_thread
The thread to change the priority on.
minpri The minimum value the priority can have. This must be a number
in the range 1 to 16.
maxpri The maximum value the priority can assume. This must be a
number in the range 1 to 16.
Data Structures
The data structures are defined as follows:
thread_t
The basic thread id. This is a black box value that is not
significant outside the thread system. It is guaranteed that no two
active threads on a node will have the same thread id.
kern_return_t
An enumeration of the possible values a system call can return. It
indicates the success or failure of the call. It will either be
[KERN_SUCCESS] to indicate that the call succeeded, or some other
value to describe the reason for the failure.
DIAGNOSTICS
Upon successful completion, thread_set_priority returns [KERN_SUCCESS];
otherwise, errno is set to indicate the error.
ERRORS
This function fails if
[KERN_INVALID_ARGUMENT]
The specified thread was not a valid thread or the specified
priority was not in the legal range.
[KERN_PROTECTION_FAILURE]
The process this thread is in does not have sufficient rights
to set priority in the target thread.
SEE ALSO
thread_create(3T), thread_terminate(3T), thread_suspend(3T),
thread_resume(3T), thread_abort(3T), thread_self(3T), thread_info(3T),
thread_state(3T), thread_handle_signals(3T), thread_inhibit(3T),
thread_cleanup(3T), thread_startup(3T), threadp_init(3T),
threadp_set(3T), threadp_get(3T).
Section (3P) pthread calls (IEEE P1003.4a) calls
Domain System Software Release Notes, Software Release 10.4
NOTES
This call is one of the set of Domain/OS extensions to the Mach thread
interface.
This call is provided solely for compatibility with the Mach operating
system. New applications should use the Pthread interface instead.