On Thursday 15 April 2010 9:17:14 am Lawrence Stewart wrote: > void > newreno_ack_received(struct cc_var *ccv) > { > u_int cw = CCV_DO(ccv, snd_cwnd); > ... > CCVC(ccv, snd_cwnd = blah); > } > > Of course, this falls apart if you try do this for example: > > CCVC(ccv, snd_cwnd = min(blah, bleh)); > > > So... I'm sure there are some good ideas out there and would really > appreciate hearing about them.
If you want to go this route, you could use separate _SET and _GET macros ala PCPU_*(). Then you would end up with something like: u_int cw = CCV_GET(ccv, snd_cwnd); CCV_SET(ccv, snd_cwnd, min(blah, bleh)); -- John Baldwin _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"