Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 16 Oct 2002 15:07:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 16 Oct 2002 15:07:03 -0400 Received: from x35.xmailserver.org ([208.129.208.51]:2701 "EHLO x35.xmailserver.org") by vger.kernel.org with ESMTP id ; Wed, 16 Oct 2002 15:06:30 -0400 X-AuthUser: davidel@xmailserver.org Date: Wed, 16 Oct 2002 12:20:03 -0700 (PDT) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: John Gardiner Myers cc: Benjamin LaHaise , Dan Kegel , Shailabh Nagar , linux-kernel , linux-aio , Andrew Morton , David Miller , Linus Torvalds , Stephen Tweedie Subject: Re: [PATCH] async poll for 2.5 In-Reply-To: <3DADACD6.4000200@netscape.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1467 Lines: 58 On Wed, 16 Oct 2002, John Gardiner Myers wrote: > Davide Libenzi wrote: > > >I knew you were going there, aka you do not understand how edge triggered > >API have to be used. > > > Nonsense. > > >Even if the API will drop an event at registration > >time you still cannot use this code scheme : > > > >int my_io(...) { > > > > if (event_wait(...)) > > do_io(...); > > > >} > > > >You CAN NOT. And look, it is not an API problem, it's your problem that > >you want to use the API like a poll()-like API. > > > You have insufficient basis upon which to claim I would write code as > broken as above. Yes I have, look down 15 lines ... > >This because you have to consume the I/O space to push the level to 0 so > >that a transaction 0->1 can happen and you can happily receive your > >events. > > > > > Of course you have to consume the I/O space to push the level to 0. > What do you think I am, stupid? > > This is done with something like: > > for (;;) { > fd = event_wait(...); > while (do_io(fd) != EAGAIN); > } I told you did not understand the API, this code won't work for edge triggered APIs. Please consider investigating a little bit more before shooting to perfectly working APIs. - Davide - 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/