mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 23:19:00 +00:00
YAMF22: (rev 1.3.2.2) Display realtime and idle priorities appropriately.
This commit is contained in:
parent
39a3d94ba8
commit
e5aff02f68
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29904
@ -17,7 +17,7 @@
|
||||
* Steven Wallace <swallace@freebsd.org>
|
||||
* Wolfram Schneider <wosch@FreeBSD.org>
|
||||
*
|
||||
* $Id: machine.c,v 1.5 1997/07/14 09:06:46 peter Exp $
|
||||
* $Id: machine.c,v 1.6 1997/08/27 03:48:25 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -39,6 +39,8 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/rtprio.h>
|
||||
|
||||
/* Swap */
|
||||
#include <stdlib.h>
|
||||
@ -594,7 +596,17 @@ char *(*get_userid)();
|
||||
namelength, namelength,
|
||||
(*get_userid)(EP(pp, e_pcred.p_ruid)),
|
||||
PP(pp, p_priority) - PZERO,
|
||||
PP(pp, p_nice) - NZERO,
|
||||
|
||||
/*
|
||||
* normal time -> nice value -20 - +20
|
||||
* real time 0 - 31 -> nice value -52 - -21
|
||||
* idle time 0 - 31 -> nice value +21 - +52
|
||||
*/
|
||||
(PP(pp, p_rtprio.type) == RTP_PRIO_NORMAL ?
|
||||
PP(pp, p_nice) - NZERO :
|
||||
(PP(pp, p_rtprio.type) == RTP_PRIO_REALTIME ?
|
||||
(PRIO_MIN - 1 - RTP_PRIO_MAX + PP(pp, p_rtprio.prio)) :
|
||||
(PRIO_MAX + 1 + PP(pp, p_rtprio.prio)))),
|
||||
format_k2(pagetok(PROCSIZE(pp))),
|
||||
format_k2(pagetok(VP(pp, vm_rssize))),
|
||||
status,
|
||||
|
Loading…
Reference in New Issue
Block a user