Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
Developer Support
QNX Documentation Library
QNX Developer Support

QNX Developer Support

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Index] [Next]

getprio()

Get the priority of a given process

Synopsis:

#include <sched.h>

int getprio( pid_t pid );

Arguments:

pid
The process ID of the process whose priority you want to get.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The getprio() function returns the current priority of thread 1 in process pid. If pid is zero, the priority of the calling thread is returned.

Returns:

The priority, or -1 if an error occurred (errno is set).

Errors:

ESRCH
The process pid doesn't exist.

Classification:

QNX 4

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

Caveats:

The getprio() and setprio() functions are included in the QNX Neutrino libraries for porting QNX 4 applications. For new programs, use sched_getparam() or pthread_getschedparam().

See also:

errno, pthread_getschedparam(), pthread_setschedparam(), sched_get_priority_max(), sched_get_priority_min(), sched_getparam(), sched_getscheduler(), sched_setscheduler(), sched_yield(), setprio()


[Previous] [Contents] [Index] [Next]