Re: [rfc] epoll interface change and glibc bits ...

From: Denis Vlasenko (vda@port.imtp.ilyichevsk.odessa.ua)
Date: Thu Nov 21 2002 - 15:08:16 EST


On 20 November 2002 22:33, Mark Mielke wrote:
> On Wed, Nov 20, 2002 at 03:57:26PM -0800, Davide Libenzi wrote:
> > > What were you thinking? 1X64 bit or 2X32 bit?
> >
> > typedef union epoll_obj {
> > void *ptr;
> > __uint32_t u32[2];
> > __uint64_t u64;
> > } epoll_obj_t;
> > I'm open to suggestions though. The "ptr" enable me to avoid wierd
> > casts to avoid gcc screaming.
>
> It looks fine to me for as long as we can guarantee that sizeof(void
> *) will be less than or equal to sizeof(__uint64_t) (relatively
> safe).
>
> I still prefer 'userdata' over 'obj', but the name of thing is not
> very important to me.
>
> I'm not sure if this is wise or not, but an 'fd' member might be
> useful as well:
>
> typedef union epoll_obj {
> void *ptr;
> int fd;
> __uint32_t u32[2];
> __uint64_t u64;
> } epoll_obj_t;

u32 and u64 sounds more like type name. d32 / d64 ?

--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:36 EST