sched_rr_get_interval Subroutine

Purpose

Gets the execution time limits.

Library

Standard C Library (libc.a)

Syntax

#include <sched.h>

int sched_rr_get_interval (pid, interval)
pid_t pid;
struct timespec *interval;

Description

The sched_rr_get_interval subroutine updates the timespec structure referenced by the interval parameter to contain the current execution time limit for the process specified by the pid parameter.

The current execution time limit applies to process made of system-scope pthreads only, and it is the value of the timeslice tunable for the process specified.

If value of the pid parameter is zero, the current execution time limit for the calling process is returned.

Parameters

Item Description
pid Specifies the process for which the current execution time limit is retrieved.
interval Points to the timespec structure to be updated.

Return Values

If successful, the sched_rr_get_interval subroutine returns zero. Otherwise, it returns -1 and sets errno to indicate the error.

Error Codes

The sched_rr_get_interval subroutine fails if:
Item Description
EINVAL The param parameter is null or a bad address.
ENOTSUP This interface does not support processes capable of checkpoint.
ESRCH The pid parameter is negative, or no process can be found that corresponds to the one specified by the pid parameter.