Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268737AbUIQMiu (ORCPT ); Fri, 17 Sep 2004 08:38:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268734AbUIQMiu (ORCPT ); Fri, 17 Sep 2004 08:38:50 -0400 Received: from postfix3-2.free.fr ([213.228.0.169]:51885 "EHLO postfix3-2.free.fr") by vger.kernel.org with ESMTP id S268728AbUIQMiB (ORCPT ); Fri, 17 Sep 2004 08:38:01 -0400 From: Duncan Sands To: Stelian Pop Subject: Re: [RFC, 2.6] a simple FIFO implementation Date: Fri, 17 Sep 2004 14:37:57 +0200 User-Agent: KMail/1.6.2 Cc: Hugh Dickins , Andrew Morton , linux-kernel@vger.kernel.org References: <20040917102413.GA3089@crusoe.alcove-fr> <20040917122400.GD3089@crusoe.alcove-fr> In-Reply-To: <20040917122400.GD3089@crusoe.alcove-fr> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409171437.57766.baldrick@free.fr> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 643 Lines: 18 > + * Note that with only one concurrent reader and one concurrent > + * writer, you don't need extra locking to use these functions. ^^^^^ which functions? (ambiguous) And what does "extra locking" mean? > + len = min(len, fifo->size - fifo->in + fifo->out); After all, since you are reading both in and out here, some kind of locking is needed. Ciao, Duncan. - 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/