Get the priority of a given process
#include <sched.h> int getprio( pid_t pid );
- The process ID of the process whose priority you want to get.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
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.
The priority, or -1 if an error occurred (errno is set).
- The process pid doesn't exist.