From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbbHJFxc (ORCPT ); Mon, 10 Aug 2015 01:53:32 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:35944 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752806AbbHJFxa (ORCPT ); Mon, 10 Aug 2015 01:53:30 -0400 From: Damian Hobson-Garcia To: sustrik@250bpm.com, viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, Damian Hobson-Garcia Subject: [RFC/PATCH] Generalize poll events from eventfd Date: Mon, 10 Aug 2015 14:51:45 +0900 Message-Id: <1439185906-28180-1-git-send-email-dhobsong@igel.co.jp> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello all, eventfd is very useful for generating POLLIN/POLLOUT poll events from user space but some applications may want to generate POLLPRI/POLLERR events as well. This patch submission aims to generalize the events generated by an eventfd. This is a resubmission of a patch from Feb 2013[1]. The original discussion trailed off without any conclusion, but the original author has recently confirmed[2] that this functionality is still useful, so I volunteered to rebase and resubmit the patch for discussion. I have rebased this patch onto v4.2-rc5 and modified the original patch to not add an indentation level to the implementations of eventfd_{read,write, poll}. I hope these changes will make it easier to review. The description of the efd_mask structure was also updated. I have a few comments and questions, but I will add those separately as a reply for open discussion. [1] https://lkml.org/lkml/2013/2/18/147 [2] https://lkml.org/lkml/2015/7/9/153 Thank you, Damian Martin Sustrik (1): eventfd: implementation of EFD_MASK flag fs/eventfd.c | 91 ++++++++++++++++++++++++++++++++++++++------ include/linux/eventfd.h | 16 +------- include/uapi/linux/eventfd.h | 40 +++++++++++++++++++ 3 files changed, 121 insertions(+), 26 deletions(-) create mode 100644 include/uapi/linux/eventfd.h -- 1.9.1