Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751110AbWCaBdw (ORCPT ); Thu, 30 Mar 2006 20:33:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751182AbWCaBdw (ORCPT ); Thu, 30 Mar 2006 20:33:52 -0500 Received: from science.horizon.com ([192.35.100.1]:55875 "HELO science.horizon.com") by vger.kernel.org with SMTP id S1751110AbWCaBdv (ORCPT ); Thu, 30 Mar 2006 20:33:51 -0500 Date: 30 Mar 2006 20:33:46 -0500 Message-ID: <20060331013346.913.qmail@science.horizon.com> From: linux@horizon.com To: clameter@sgi.com Subject: Re: Synchronizing Bit operations V2 Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1142 Lines: 33 > The following patchset implements the ability to specify a > synchronization mode for bit operations. > > I.e. instead of set_bit(x,y) we can do set_bit(x,y, mode). > > The following modes are supported: Yuck. The only conceivable reason for passing the mode as a separate parameter is - To change the mode dynamically at run time. - To share common code when the sequence is long and mostly shared between the various modes (as in open(2) or ll_rw_block()). I sincerely hope neither of those apply in this case. On the downside, it's more typing and uglier than a series of frob_bit_nonatomic() (probably temporarily or permanently aliased to frob_bit()) frob_bit_atomic() frob_bit_acquire() frob_bit_release() frob_bit_barrier() functions, and those also prevent you from doing something silly like frob_bit(x, y, O_DIRECT). Also, the MODE_ prefix might be wanted by something else. - 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/