From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791AbbIPHoA (ORCPT ); Wed, 16 Sep 2015 03:44:00 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:32768 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752524AbbIPHn6 (ORCPT ); Wed, 16 Sep 2015 03:43:58 -0400 Subject: Re: [PATCH v2 1/1] eventfd: implementation of EFD_MASK flag To: Martin Sustrik References: <1442384836-13045-1-git-send-email-dhobsong@igel.co.jp> <1442384836-13045-2-git-send-email-dhobsong@igel.co.jp> <70093385dc00b108e16862c8b8b1c13c@imap.lucina.net> Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, netdev@vger.kernel.org, David.Laight@aculab.com From: Damian Hobson-Garcia X-Enigmail-Draft-Status: N1110 Message-ID: <55F91DBE.90903@igel.co.jp> Date: Wed, 16 Sep 2015 16:43:58 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <70093385dc00b108e16862c8b8b1c13c@imap.lucina.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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