On Mon, May 13, 2002 at 10:19:36AM -0700, David Brownell wrote: > > > How come param is declared as unsigned long then in the body > > of the ehci_tasklet, it is typecasted as (struct ehci_hcd *)? > > Should param be declared as (void *param) not unsigned long? > > It's declared as "unsigned long" because that's how tasklets work. > If "unsigned long" is bigger than a pointer, the extra bits get safely > discarded.
sizeof(unsigned long) is always guaranteed to be equal to sizeof(void *) on Linux. It's one of the compiler assumptions the kernel makes (there are some others, and I had a list around here somewhere with them, but I can't find it right now...it's in the lkml archives from a few years ago if anyone is interested) Well, this might not be true for the 8086 version of Linux, but all other versions :) greg k-h _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
