United States-English |
|
|
HP-UX Reference > Ppthread_gettimeslice_np(3T)Pthread LibraryHP-UX 11i Version 3: February 2007 |
|
NAMEpthread_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 ); DESCRIPTIONThe 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 VALUEpthread_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). ERRORSIf any of the following occur, the pthread_settimeslice_np() function returns the following error number:
WARNINGSSetting the timeslice value lesser than the default timeslice value may cause a performance deterioration. SEE ALSOpthread_getschedparam(3T), pthread_attr_setschedpolicy(3T), pthread_attr_getschedparam(3T), pthread_attr_getschedpolicy(3T), rtsched(2). |
Printable version | ||
|