Re: ioctl(2) vs sys/ioctl.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: der Mouse
Date: Sunday, December 19, 2010 - 2:52 pm

> There is a bigger problem, the 'int' and 'void *' arguments might be

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.)


...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
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ioctl(2) vs sys/ioctl.h, Paul Goyette, (Sat Dec 18, 5:06 pm)
Re: ioctl(2) vs sys/ioctl.h, Christos Zoulas, (Sat Dec 18, 5:24 pm)
Re: ioctl(2) vs sys/ioctl.h, der Mouse, (Sat Dec 18, 7:44 pm)
Re: ioctl(2) vs sys/ioctl.h, Iain Hibbert, (Sun Dec 19, 2:35 am)
Re: ioctl(2) vs sys/ioctl.h, Paul Goyette, (Sun Dec 19, 9:00 am)
Re: ioctl(2) vs sys/ioctl.h, David Laight, (Sun Dec 19, 12:32 pm)
Re: ioctl(2) vs sys/ioctl.h, Rhialto, (Sun Dec 19, 1:06 pm)
Re: ioctl(2) vs sys/ioctl.h, David Laight, (Sun Dec 19, 1:32 pm)
Re: ioctl(2) vs sys/ioctl.h, der Mouse, (Sun Dec 19, 2:52 pm)
Re: ioctl(2) vs sys/ioctl.h, Christos Zoulas, (Sun Dec 19, 2:59 pm)