Peter Memishian wrote: > > By the way, I found a few more warnings in lint because of this change. > > Essentially, MBLKL() now returns an unsigned value, rather than signed, > > because of casting to (uintptr_t). (And that's pretty reasonable... the > > idea that there could ever be an mblk where b_wptr < b_rptr is > nonsensical.) > > I've debugged numerous problems over the years where b_wptr < b_rptr. > Yes, it's always a bug somewhere -- but it's really important that these > cases be detected, and ideally that the machine panic (at least on DEBUG) > when it discovers them. Otherwise, the resulting data corruption can be > *really* hard to track down. So, in other words, if we've lost this > ability, I'd regard that as a serious regression. Also, note that MBLKL() > and other related macros are intentionally defined to "return int" in the > DDI so that modules and drivers can detect corrupt mblks rather than > paper over them. >
Hmm... that's a good point. I should probably change the macros to cast to intptr_t then. -- Garrett > -- > meem > _______________________________________________ > networking-discuss mailing list > [EMAIL PROTECTED] > _______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss