linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* opaque types instead of union epoll_data
@ 2017-03-07 12:31 Sodagudi Prasad
       [not found] ` <c06a9ceff1f2c8919ca81120de69f172-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Sodagudi Prasad @ 2017-03-07 12:31 UTC (permalink / raw)
  To: linux-api, linux-kernel; +Cc: gregkh

Hi All,

uapi structs epoll_data are more opaque than user space expects. kernel 
have defined as __u64 instead of the union epoll_data.
Because of this libc have redefined struct epoll_event with union data 
member.

https://android.googlesource.com/platform/bionic.git/+/master/libc/include/sys/epoll.h
typedef union epoll_data {
   void* ptr;
   int fd;
   uint32_t u32;
   uint64_t u64;
} epoll_data_t;
struct epoll_event {
   uint32_t events;
   epoll_data_t data;
}

Kernel UAPI header defined as "include/uapi/linux/eventpoll.h"
struct epoll_event {
         __u32 events;
         __u64 data;  =====>opaque type instead of union epoll_data
} EPOLL_PACKED;


Because of this we are landing into some issues as we copy kernel 
headers. Will it be going to be addressed?

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora 
Forum,
Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-08 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-07 12:31 opaque types instead of union epoll_data Sodagudi Prasad
     [not found] ` <c06a9ceff1f2c8919ca81120de69f172-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-03-07 14:33   ` Carlos O'Donell
2017-03-07 17:59     ` Greg KH
     [not found]       ` <20170307175931.GA31000-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2017-03-08 17:34         ` Carlos O'Donell
     [not found]           ` <ba7d0715-b59a-6596-9ec0-435999cd0e76-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-03-08 18:01             ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).