From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5916 invoked by alias); 14 Jul 2002 17:10:09 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5898 invoked from network); 14 Jul 2002 17:10:06 -0000 Received: from unknown (HELO fadata.bg) (217.9.226.246) by sources.redhat.com with SMTP; 14 Jul 2002 17:10:06 -0000 Received: (qmail 7169 invoked by uid 1000); 14 Jul 2002 17:10:02 -0000 To: Andrew Cagney Cc: Grant Edwards , gdb-patches@sources.redhat.com Subject: Re: RDI code busy-waiting on running target? References: <20020711175854.A29971@visi.com> <20020711184343.A4472@visi.com> <20020712102650.A6637@visi.com> <20020712130727.A7707@visi.com> <3D31AC1D.5060906@ges.redhat.com> From: Momchil Velikov Date: Sun, 14 Jul 2002 10:10:00 -0000 Message-ID: <87ele68cd1.fsf@fadata.bg> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-07/txt/msg00304.txt.bz2 >>>>> "Andrew" == Andrew Cagney writes: >> + struct timeval timeout; >> + timeout.tv_sec = 0; >> + timeout.tv_usec = 10000; >> + >> + select(0,0,0,0,&timeout); >> + Andrew> Doing a select on nothing strikes me as wrong. How is this code Andrew> detecting that something is ``ready''? Timeout. AFAIK, the only option for high-resolution sleep in systems lacking ``nanosleep''. ~velco