Search Linux Wireless

Re: [patch 3/9] mac80211: Add PID controller based rate control algorithm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2007-12-17 at 12:50 +0100, Johannes Berg wrote:
> > +	/* We need to do an arithmetic right shift. ISO C says this is
> > +	 * implementation defined for negative left operands. Hence, be
> > +	 * careful to get it right, also for negative values. */
> > +	adj = (adj < 0) ? -((-adj) >> (2 * RC_PID_ARITH_SHIFT)) :
> > +			  adj >> (2 * RC_PID_ARITH_SHIFT);
> 
> That looks... weird.
> 
> As far as I know all compilers the kernel can use will do an arithmetic
> right shift if the data type is signed.

Where is your information from? I actually had some misbehaviour that
was fixed after I introduced this. I'll check the assembly gcc produces
to shed some light on this.

Mattias

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux