Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FilePsetpriority()Pgetpriority() GEMDOSSyntaxLONG Pgetpriority( which, who )
WORD which;
WORD who;
Function Pgetpriority() gets the current priority value for a process.
Opcode 344 (0x0158)
Availability Available when a 'MiNT' cookie with a version of at least
1.15 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 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()