In message: <[email protected]>
            Andrew Thompson <[email protected]> writes:
: > > xxx_set_channel()
: > > {
: > >   ieee80211_channel c = wlan->curchan;
: > >
: > >   hw_reg = array1[c];
: > >   write USB register;
: > >   hw_reg = array2[c];
: > >   write USB register;
: > > }
: > 
: > And don't forget "volatile" ...
: 
: I dont understand this. c is a pointer to a valid net80211 channel which
: will never disappear.

"volatile" would be a bug here.  There's no reason to use it at all,
since wlan->curchan doesn't match what ANSI-C says a volatile is for.
In addition, since it is only loaded once, there wouldn't be a need
for it even if it did meet the definition.

You *CANNOT* rely on 'volatile' fixing locking issues.

Warner
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[email protected]"

Reply via email to