Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: [git pull] vfs.git: poll annotations

$
0
0
Linus Torvalds writes: (Summary) wrote:

[...]

the annotations through the tree.
Ok, I'm not entirely happy with this.
Ok, I'm not entirely happy with this.
I don't think the mangle/demangle_poll() stuff should be in the uapi headers, and it really worries me that we use the same names - with
different values - for the kernel and user versions of the POLLxyz
macros.

That could make the mangling be automated too, ie assuming gcc gets it
right, maybe done with

   #define pollmask_to_kernel(uval, UMASK, KMASK) \
        ((force __poll_t)(((uval)&UMASK)/UMASK*KMASK))

   static inline __poll_t unmangle_poll(unsigned int uval)
   {
        return pollmask_to_kernel(uval, POLLIN, KPOLLIN) |

Viewing all articles
Browse latest Browse all 1267

Trending Articles