On Wed, 21 Feb 2007, Stephen Rothwell wrote:

> Hi Davide,
> 
> > Reminder for Andrew ...
> > We talked about having an asm/compat.h define the proper 
> > compat_epoll_event structure, and having a define in there that triggers 
> > the proper code inside kernel/compat.c. It looks like the better way to 
> > go, as Stephen suggested.
> > If that's accepted by everyone, I can go ahead and make a patch. Lemme 
> > know ...
> 
> Like below?  I did the above and moved the code to fs/compat.c (from
> kernel/compat.c).  Also MIPS already has a compat_sys_epoll_pwait, so I
> had to add an #ifndef CONFIG_MIPS.

I was thinking something different. Example:

[include/asm-XXX/compat.h]

        struct compat_epoll_event {
                ...
        } ATTR ...;
        #define NEED_EPOLL_EVENT_COMPAT 1


[kernel/compat.c]

        #ifdef CONFIG_EPOLL

        #ifdef NEED_EPOLL_EVENT_COMPAT
        ....
        #endif

        #endif


That way we don't have arch-specific (MIPS, IA64, ...) ifdefs inside 
common code.




- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to