]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bin/ps: Make the rtprio option actually show realtime priorities
authorsalvadore <salvadore@FreeBSD.org>
Fri, 19 Jun 2020 09:27:58 +0000 (09:27 +0000)
committersalvadore <salvadore@FreeBSD.org>
Fri, 19 Jun 2020 09:27:58 +0000 (09:27 +0000)
commit98fe3d31f1ff6f78e9424e5d5f5f067e7facb5bf
treea1738ad5d6b6546c2adbb73e27bc221dd2504f91
parent44fb37047a341eea9eb8b502bccfbb9ff127f9d9
bin/ps: Make the rtprio option actually show realtime priorities

Fix the rtprio option that for some reason was progessively becoming an
option showing the priority class of threads. In particular:

- use the constants defined in sys/sys/rtprio.h instead of those defined in
  sys/sys/priority.h: this helps making clearer that the code actually is
  about realtime priorities and not standard scheduler priorities;
- remove the PRI_ITHD case that has nothing to do with realtime priorities;
- convert the priority levels to realtime priority levels using the same
  formulas used for pri_to_rtp function in sys/kern/kern_resource.c.
- remove outdated note "101 = not a realtime process" in the man page and
  replace it with a more useful reference to man 1 rtprio.

Approved by: src (mckusick), manpages (bcr), gerald (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25266
bin/ps/print.c
bin/ps/ps.1