getpriority.2

来自「minix操作系统最新版本(3.1.1)的源代码」· 2 代码 · 共 38 行

2
38
字号
.TH GETPRIORITY 2 "Jul 1, 2005".UC 4.SH NAMEgetpriority, setpriority \- get and set scheduling priority.SH SYNOPSIS.nf.ft B#include <sys/resource.h>int getpriority(int \fIwhich\fP, int \fIwho\fP)int setpriority(int \fIwhich\fP, int \fIwho\fP, int \fIprio\fP).SH DESCRIPTION.B Getpriorityreturns the scheduling priority of the process, process group, or userreferred to in \fIwho\fP. Which of the three is indicated in\fIwhich\fP, by PRIO_PROCESS, PRIO_PGRP and PRIO_USER, respectively.In MINIX 3, currently only PRIO_PROCESS is implemented.The range of the returned value is between PRIO_MIN and PRIO_MAX,currently between -20 and 20, and is the so-called nice value ofa process. The higher the nice value, the less favourable the schedulingpriority..B Setprioritysets the priority indicated by \fIwho\fP and \fIwhich\fP to \fIprio\fP.\fIprio\fP, which is the nice value, may only be lowered by the super-user..SH RETURN VALUESThese functions both return -1 on failure, and set errno in this case.Because.B getprioritycan return -1 as the real nice value, the caller has to reset errnoand check errno afterwards to distinguish between an error conditionand a negative nice value..SH SEE ALSOnice(1).SH AUTHORBen Gras <beng@few.vu.nl>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?