LONG Pgetpriority(which, who)
WORD which;
WORD who;
Pgetpriority() gets the current priority value for a process. | |
Opcode | 344 (0x0158) |
Availability | Available when a MiNT kernel of a version at least 1.15.0 release is detected. |
Parameters |
Pgetpriority() gets the priority of the processes specified by
which and who. The interpretation of
parameter who depends on which:
PRIO_PROCESS (0) reads the priority of process with process id which. A who of 0 implies the process id of the calling process. PRIO_PGRP (1) reads the priority of the process group with process group id who. If the priorities of the process differ, the lowest valued priority (i. e. the highest CPU usage priority) is returned. A who of 0 implies the process group id of the calling process. PRIO_USER (2) reads the priority of the process of the user with user id who. For multiple processes the lowest valued priority is returned. A who of 0 implies the user id of the calling process. |
Binding |
move.w who,-(sp) move.w which,-(sp) move.w #$0158,-(sp) trap #1 addq.l #6,sp |
Return Value | Return value is either a negative error number in case of failure or the requested priority + 20 on success. |
Comments | Library functions should first check
for an error condition and then decrement the returned value by 20.
This call makes calls Pnice() and Prenice() obsolete. |
See Also | Psetpriority() |