From: David Woodhouse Subject: Re: filesystem signal handling Date: Thu, 29 Apr 2004 03:34:56 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1083206096.4694.42.camel@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, smfltc@us.ibm.com Return-path: Received: from pentafluge.infradead.org ([213.86.99.235]:52197 "EHLO pentafluge.infradead.org") by vger.kernel.org with ESMTP id S262418AbUD2CfK (ORCPT ); Wed, 28 Apr 2004 22:35:10 -0400 To: Bryan Henderson In-Reply-To: List-Id: linux-fsdevel.vger.kernel.org On Wed, 2004-04-28 at 14:46 -0700, Bryan Henderson wrote: > >It's [blocking signals] fairly ugly. What would be a _lot_ nicer if we > could > >have something in the task_struct which is vaguely reminiscent of > >preempt_count, only it counts the number of reasons why this task cannot > >receive signals. So instead of using the TASK_INTERRUPTIBLE and > >TASK_UNINTERRUPTIBLE states to make the decision, we'd look at the > >task's uninterruptible_count instead. > > Why is this less ugly than setting the signal mask and doing a > save/restore? Because it's fewer lines of code? Fewer instructions? TBH it's mostly because it doesn't make my head hurt when I try to prove to myself that it's safe w.r.t. multi-threaded signal handling, with different signals having per-process and per-thread semantics etc. -- dwmw2