[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'oldlinux' (#rtl)

GetPriority

Return process priority

Declaration

Source position: oldlinux.pp line 1357

function GetPriority(

  Which: Integer;

  Who: Integer

):Integer;

Description

GetPriority returns the priority with which a process is running. Which process(es) is determined by the Which and Who variables. Which can be one of the pre-defined Prio_Process, Prio_PGrp, Prio_User, in which case Who is the process ID, Process group ID or User ID, respectively.

For an example, see Nice.

Errors

Error checking must be done on LinuxError, since a priority can be negative.

sys_esrch
No process found using which and who.
sys_einval
Which was not one of Prio_Process, Prio_Grp or Prio_User.

See also

SetPriority

  

Set process priority

Nice

  

Set process priority

The latest version of this document can be found at lazarus-ccr.sourceforge.net.