In article <r0q8j6$dj0$1...@ciao.gmane.io>, Christos Zoulas <chris...@astron.com> wrote: >In article <4251.1580234...@jinx.noi.kre.to>, >Robert Elz <k...@munnari.oz.au> wrote: >> Date: Tue, 28 Jan 2020 16:40:27 +0000 >> From: "Andrew Doran" <a...@netbsd.org> >> Message-ID: <20200128164027.8558bf...@cvs.netbsd.org> >> >> | Log Message: >> | Put pri_t back to an int. It looks like there might be a sign extension >> | issue somewhere but it's not worth the hassle trying to find it. >> >>This changes the kernel internal ABI doesn't it? It would have needed >>a kernel version bump when the reverted change was made, and now needs >>one it has been removed, doesn't it? > >Yes, but let's try to fix it and put it back the way it was before. It can't >be used in too many places...
So I just took a quick look and it is non-trivial to change this to something smaller than int, because it is used as an int in many places, eg. <sys/sched.h> int sched_priority; (do_sched_setparam needs fixing, sys__sched_protect needs fixing), even small issues like: --- kern_sleepq.c 21 Nov 2019 18:56:55 -0000 1.52 +++ kern_sleepq.c 28 Jan 2020 21:38:06 -0000 @@ -171,7 +171,7 @@ if ((sobj->sobj_flag & SOBJ_SLEEPQ_SORTED) != 0) { lwp_t *l2; - const int pri = lwp_eprio(l); + const pri_t pri = lwp_eprio(l); TAILQ_FOREACH(l2, sq, l_sleepchain) { if (lwp_eprio(l2) < pri) { christos