Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225801

Re: [PATCH v2 1/1] eventfd: implementation of EFD_MASK flag

From Damian Hobson-Garcia <dhobsong@igel.co.jp>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/1] eventfd: implementation of EFD_MASK flag
Date 2015-09-16 09:50 +0200
Message-ID <q9fDz-6qt-5@gated-at.bofh.it> (permalink)
References <q9eo9-4IR-1@gated-at.bofh.it> <q9eo9-4IR-7@gated-at.bofh.it> <q9eRc-5gC-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Martin,

On 2015-09-16 3:51 PM, Martin Sustrik wrote:
> On 2015-09-16 08:27, Damian Hobson-Garcia wrote:
>>
>> Additionally, to provide a way to associate user-space state with eventfd
>> object, it allows to attach user-space data to the file descriptor.
> 
> The above paragraph is a leftover from the past. The functionality no
> longer exist.
> 
Oops, I forgot to delete that part. I'll get rid of it.

>>
>> The semantics of EFD_MASK are as follows:
>>
>> eventfd(2):
>>
>> If eventfd is created with EFD_MASK flag set, it is initialised in such a
>> way as to signal no events on the file descriptor when it is polled on.
>> The 'initval' argument is ignored.
>>
>> write(2):
>>
>> User is allowed to write only buffers containing the following structure:
>>
>> struct efd_mask {
>>   uint32_t events;
>> };
> 
> Is it worth having a struct here? Why not just uint32_t?
As it stands right now, no, the struct doesn't really add anything.
uint32_t should be just fine.
> 
> Martin

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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/1] Generalize poll events from eventfd Damian Hobson-Garcia <dhobsong@igel.co.jp> - 2015-09-16 08:30 +0200
  [PATCH v2 1/1] eventfd: implementation of EFD_MASK flag Damian Hobson-Garcia <dhobsong@igel.co.jp> - 2015-09-16 08:30 +0200
    Re: [PATCH v2 1/1] eventfd: implementation of EFD_MASK flag Martin Sustrik <sustrik@250bpm.com> - 2015-09-16 09:00 +0200
      Re: [PATCH v2 1/1] eventfd: implementation of EFD_MASK flag Damian Hobson-Garcia <dhobsong@igel.co.jp> - 2015-09-16 09:50 +0200

csiph-web