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 to subtracting 1.)", but "pri = --pri % RQ_NQS;" will behave like you expect, while "pri = (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 -- /"\ Best regards, | [EMAIL PROTECTED] \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | [EMAIL PROTECTED] / \ ASCII Ribbon Campaign | Against HTML Mail and News
pgpkZnY6GGDUG.pgp
Description: PGP signature