RDI code busy-waiting on running target?

Momchil Velikov velco@fadata.bg
Sun Jul 14 10:10:00 GMT 2002


>>>>> "Andrew" == Andrew Cagney <ac131313@ges.redhat.com> 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



More information about the Gdb-patches mailing list