[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

getpri Subroutine

Purpose

Returns the scheduling priority of a process.

Library

Standard C Library (libc.a)

Syntax


int getpri ( ProcessID)
pid_t ProcessID;

Description

The getpri subroutine returns the scheduling priority of a process.

Parameters

ProcessID Specifies the process ID. If this value is 0, the current process scheduling priority is returned.

Return Values

Upon successful completion, the getpri subroutine returns the scheduling priority of a thread in the process. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.

Error Codes

The getpri subroutine is unsuccessful if one of the following is true:

EPERM A process was located, but its effective and real user ID did not match those of the process executing the getpri subroutine, and the calling process did not have root user authority.
ESRCH No process can be found corresponding to that specified by the ProcessID parameter.

Related Information

The setpri subroutine.

Performance-Related Subroutines in AIX 5L Version 5.2 Performance Management Guide.

Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]