lkml.org 
[lkml]   [2002]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [rfc] epoll interface change and glibc bits ...
    On Mon, Nov 18, 2002 at 08:15:39AM -0800, Davide Libenzi wrote:
    > > > 1) epoll's event structure extension
    > > >
    > > > I received quite a few request to extend the event structure to have space
    > > > for an opaque user data object. The eventpoll event structure will turn to
    > > > be :
    > > >
    > > > struct epollfd {
    > > > int fd;
    > > > unsigned short int events, revents;
    > > > unsigned long obj;
    > >
    > > Cannot this be uint64_t obj; ?
    > > Have mercy with 32<->64 bit translation layers in the kernel.
    >
    > Maybe this :
    >
    > typedef void *epoll_obj_t;

    That is as bad as unsigned long - it is different between 32-bit and 64-bit
    ABIs.
    Unless you handle the translation in the generic epoll code, there will
    need to be wrappers around it which will kmalloc (maxelements * sizeof (struct epollfd));
    do the generic epoll into that array and then translate all the structures
    in that array into smaller ones and copy to userspace.

    Jakub
    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:31    [W:0.050 / U:0.040 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site