Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757202AbWKVXzy (ORCPT ); Wed, 22 Nov 2006 18:55:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757203AbWKVXzy (ORCPT ); Wed, 22 Nov 2006 18:55:54 -0500 Received: from mx1.redhat.com ([66.187.233.31]:6070 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S1757197AbWKVXzw (ORCPT ); Wed, 22 Nov 2006 18:55:52 -0500 Message-ID: <4564E2AB.1020202@redhat.com> Date: Wed, 22 Nov 2006 15:52:11 -0800 From: Ulrich Drepper Organization: Red Hat, Inc. User-Agent: Thunderbird 1.5.0.8 (X11/20061107) MIME-Version: 1.0 To: Evgeniy Polyakov CC: David Miller , Andrew Morton , netdev , Zach Brown , Christoph Hellwig , Chase Venters , Johann Borck , linux-kernel@vger.kernel.org, Jeff Garzik Subject: Re: [take25 1/6] kevent: Description. References: <11641265982190@2ka.mipt.ru> In-Reply-To: <11641265982190@2ka.mipt.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 906 Lines: 24 Evgeniy Polyakov wrote: > + struct kevent_ring > + { > + unsigned int ring_kidx, ring_uidx, ring_over; > + struct ukevent event[0]; > + } > + [...] > +ring_uidx - index of the first entry userspace can start reading from Do we need this value in the structure? Userlevel cannot and should not be able to modify it. So, userland has in any case to track the tail pointer itself. Why then have this value at all? After kevent_init() the tail pointer is implicitly assumed to be 0. Since the front pointer (well index) is also zero nothing is available for reading. -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ - 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/