Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Mar 2007 21:00:05 +0100
From:      Max Laier <max@love2party.net>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        cvs-src@freebsd.org, Jeff Roberson <jeff@freebsd.org>, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/kern sched_ule.c
Message-ID:  <200703172100.13218.max@love2party.net>
In-Reply-To: <20070317110821.I560@10.0.0.1>
References:  <200703171813.l2HIDXWI008212@repoman.freebsd.org> <20070317110821.I560@10.0.0.1>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1367711.SVHTP6aObC
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Saturday 17 March 2007 20:09, Jeff Roberson wrote:
> Any language lawyers care to comment on this?

I find this strange.  According to the spec "(Decrementing is equivalent=20
to subtracting 1.)", but "pri =3D --pri % RQ_NQS;" will behave like you=20
expect, while "pri =3D (pri - 1) % RQ_NQS;" clearly didn't.

> On Sat, 17 Mar 2007, Jeff Roberson wrote:
> > jeff        2007-03-17 18:13:33 UTC
> >
> >  FreeBSD src repository
> >
> >  Modified files:
> >    sys/kern             sched_ule.c
> >  Log:
> >   - Cast the intermediate value in priority computtion back down to
> >     unsigned char.  Weirdly, casting the 1 constant to u_char still
> > produces a signed integer result that is then used in the %
> > computation.  This avoids that mess all together and causes a 0 pri
> > to turn into 255 % 64 as we expect.
> >
> >  Reported by:    kkenn (about 4 times, thanks)
> >
> >  Revision  Changes    Path
> >  1.190     +1 -1      src/sys/kern/sched_ule.c

=2D-=20
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

--nextPart1367711.SVHTP6aObC
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQBF/EjNXyyEoT62BG0RAvzQAJ9YnC5s5fwNFZQTmMEb8T5aLoK+xgCfbeKZ
+oms5qgEyXpzSYg16LNuoyg=
=JHU3
-----END PGP SIGNATURE-----

--nextPart1367711.SVHTP6aObC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703172100.13218.max>