From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4083 invoked by alias); 3 May 2010 20:41:46 -0000 Received: (qmail 4074 invoked by uid 22791); 3 May 2010 20:41:46 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 May 2010 20:41:41 +0000 Received: (qmail 24698 invoked from network); 3 May 2010 20:41:39 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 May 2010 20:41:39 -0000 From: Pedro Alves To: Doug Evans Subject: Re: [RFA] Fix gdbserver queued packet handling Date: Mon, 03 May 2010 20:41:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <20100430171731.5600984398@ruffy.mtv.corp.google.com> <201004301855.12464.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201005032141.36926.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00054.txt.bz2 On Monday 03 May 2010 20:53:14, Doug Evans wrote: > P.S. IWBN if one didn't have to continually keep bringing stuff over > from gdb. Wouldn't it be nice if one could just include an > event-loop.h (or some such) and use it. I'm developing the feeling > that this is another instance where IWBN if gdb and gdbserver could > share code. Yes, of course I agree. > 2010-05-03 Doug Evans > > * event-loop.c (struct callback_event): New struct. ... This is okay too. Thank you for fixing this. > +/* If there is still data in the buffer, queue another event to process it, > + we can't sleep in select yet. > + If there is no data left in the buffer, delete any pending callback. */ This last sentence appears stale. > +static void > +reschedule (void) > +{ > + if (readchar_bufcnt > 0 && readchar_callback == NOT_SCHEDULED) > + { > + readchar_callback = append_callback_event (process_remaining, NULL); > + } > } -- Pedro Alves