tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ioctl(2) vs sys/ioctl.h
> There is a bigger problem, the 'int' and 'void *' arguments might be
> passed in different ways then '...' is specified.
True, but it is not inherently a problem; it just complicates the
implementation of ioctl(), since it then has to not just pass down a
data pointer, but pass down enough information for the particular
ioctl's implementation to find whatever type the actual argument is.
(As it is, the implementation already depends on a nonportability,
basically that all pointer types are "the same". It would explode
badly on a machine where some but not all pointer types are larger than
a machine word/register.)
> We only get away with it on our 64 bit archs because they all pass
> the first 3 arguments in registers.
...and are all byte-addressed. If some pointers were 64 bits and
others were 128 (or, worse, 72 or 96 or some such), it would fall over
rather hard.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index