Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > P

pthread_gettimeslice_np(3T)

Pthread Library
HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.