pthread_gettimeslice_np.3t (2010 09)

p
pthread_gettimeslice_np(3T) pthread_gettimeslice_np(3T)
(Pthread Library)
NAME
pthread_gettimeslice_np(), pthread_settimeslice_np() - set or get the scheduling timeslice value for
PTHREAD_SCOPE_PROCESS threads with SCHED_TIMESHARE scheduling policy
SYNOPSIS
#include <pthread.h>
int pthread_gettimeslice_np(
int *tslice
);
int pthread_settimeslice_np(
int tslice
);
PARAMETERS
tslice This parameter specifies the timeslice value in milliseconds to be set.
DESCRIPTION
The functions are used to set and retrieve the timeslice value in milliseconds for timeshare process scope
threads. The timeslice value will not take into effect until the current time quantum is used up for the
thread.
pthread_settimeslice_np()
sets the timeslice value to tslice for all timeshare process scope
threads in the process.
pthread_gettimeslice_np()
retrieves the process timeslice value. tslice may range between 0
and
PTHREAD_MAXTSLICE_NP
.
RETURN VALUE
pthread_gettimeslice_np()
returns the current timeslice value in tslice .
Upon successful completion,
pthread_settimeslice_np()
returns zero. Otherwise, an error
number is returned to indicate the error (the
errno variable is not set).
ERRORS
If any of the following occur, the
pthread_settimeslice_np()
function returns the following error
number:
[EINVAL] The timeslice value was negative or greater than
PTHREAD_MAXTSLICE_NP
.
WARNINGS
Setting the timeslice value lesser than the default timeslice value may cause a performance deterioration.
AUTHOR
pthread_settimeslice_np()
and pthread_gettimeslice_np()
were developed by HP.
SEE ALSO
pthread_getschedparam(3T), pthread_attr_setschedpolicy(3T), pthread_attr_getschedparam(3T),
pthread_attr_getschedpolicy(3T), rtsched(2).
STANDARDS CONFORMANCE
pthread_settimeslice_np(): None.
pthread_gettimeslice_np(): None.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)