Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File5.12.28 Psetpriority TOS Name: »Psetpriority« - Set the current priority value for a process. Opcode: 345 (0x0159) Syntax: int32_t Psetpriority ( int16_t which, int16_t who, int16_t pri ); Description: The function Psetpriority sets the priority pri (not an increment but an absolute value) for the processes specified by which and who. The interpretation of parameter who depends on which: PRIO_PROCESS (0) sets the priority of process with process ID which. A who of 0 implies the process ID of the calling process. PRIO_PGRP (1) sets the priority of the process group with process group ID who. A who of 0 implies the process group ID of the calling process. PRIO_USER (2) sets the priority of the process of the user with user ID who. A who of 0 implies the user ID of the calling process. The pri argument is silently changed to the maximum (resp. minimum) possible value if it is not in the range between PRIO_MIN (-20) and PRIO_MAX (+20). This call makes calls Pnice and Prenice obsolete. Return value: The function returns E_OK on success or a negative error-code otherwise. The following error conditions are defined: EINVAL, invalid argument for who, which or pri. EACCES, the calling process is not an owner of one or more of the selected processes; the other selected processes are still affected EPERM, the calling process does not have privileges to change the priority of one or more of the selected processes; this can only happen if an attempt was made to change the priority of a process to a positive value ESRCH, the combination of which and who does not match any existing process. The error condition reported is the last error condition encountered (in other words if both EACCES and EPERM occur the return value is arbitrary). Availability: As of MiNT 1.15.0 Group: Process functions See also: Binding Pgetpriority