From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2858 invoked by alias); 14 Jul 2002 18:01:54 -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 2797 invoked from network); 14 Jul 2002 18:01:42 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 14 Jul 2002 18:01:42 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A20F13DB7; Sun, 14 Jul 2002 14:01:27 -0400 (EDT) Message-ID: <3D31BC77.5020700@ges.redhat.com> Date: Sun, 14 Jul 2002 11:28:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020708 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Momchil Velikov 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> <87ele68cd1.fsf@fadata.bg> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00312.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''. If it is a timeout, it should be waiting for min (time until next timeout, gui keep alive delta). Andrew