From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754494AbbJOBnI (ORCPT ); Wed, 14 Oct 2015 21:43:08 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:35641 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbbJOBnG (ORCPT ); Wed, 14 Oct 2015 21:43:06 -0400 From: Damian Hobson-Garcia To: viro@zeniv.linux.org.uk, sustrik@250bpm.com Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, netdev@vger.kernel.org, David.Laight@aculab.com, Damian Hobson-Garcia Subject: [PATCH v3 0/1] Generalize poll events from eventfd Date: Thu, 15 Oct 2015 10:42:07 +0900 Message-Id: <1444873328-8466-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 Using eventfd user space can generate POLLIN/POLLOUT events 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. [1] https://lkml.org/lkml/2013/2/18/147 [2] https://lkml.org/lkml/2015/7/9/153 Changes in v3 ------------- * replace efd_mask structure with scalar 'events' variable. Changes in v2 ------------- * rebased on Linux v4.3-rc1 * Move file operation implementations for EFD_MASK to a seperate structure * Remove 'data' element from efd_mask structure * read() is no longer supported when EFD_MASK is set (fails with EINVAL) * eventfd_ctx_fileget() now returns EINVAL when EFD_MASK is set, eliminating the possibility of triggering the orginal BUG_ON() macros which have now been removed. 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