proc_compare() is no-op since rS29310 (almost 23 years ago!), and as everyone seems to be happy with what processes w currently reports, just remove it entirely.
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
It's not immediately obvious to me why rS29310 would render this a no-op, but I know that the use of ki_estcpu instead of ki_pctcpu is bogus for anything but the 4BSD scheduler.
Comment Actions
That revision added a ep->kp == NULL check, which effectively means that first process that we got from proc_compare() is going to stay there. Also, when proc_compare() is called with one argument being NULL (and that is the only case we call it for last 23 years given the check I mentioned previously), you can guess what it would return :-)
Comment Actions
looking at this again, i'm not sure if the logic should be simply removed and not fixed instead -- i'll file a bug in case someone else would like to fix this properly