harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [M9] Last blocker
Date Thu, 02 Apr 2009 07:53:50 GMT
Alexei Fedotov wrote:
> I was able to do a partial research on unix/hysock.c

Thanks Alexei.  Me too.  It seems that Linux will also modify the
timeout struct that is passed in to represent the remaining time before
the select would have timed out, so we can pass it straight back in
again.  Not all Unixes do this though AIUI.

> 1. The patch [1] shows that when select() was used Artem Aliev had prepared
> a proper patch with while (result == -1 && errno == EINTR).

Yep, and we had some code in the original native code that dealt with
EINTR (pollSelectRead) so I don't know why the alternative was written
and used.

> 2. Currently the logic of select) call in unix/hysock.c is different, with
> no while loop.

Yes, but it was apparently done deliberately and I'd like to understand
why.  I'll put back the looping logic since we will always have to deal
with the possibility of EINTR (SIGUSR's or otherwise).

Regards,
Tim

> [1] https://issues.apache.org/jira/browse/HARMONY-1904
> 
> 
> 
> 
> 
> 2009/4/1 Tim Ellison <t.p.ellison@gmail.com>
> 
>> Alexei Fedotov wrote:
>>> As Mark said [1], the main difference in socket handling between jvms
>>> is system call interruption. DRLVM sends termination signals to system
>>> calls before stop the world garbage collection, hence they should be
>>> restarted (i.e. any system call should be put in a loop).
>> Without getting into a debate about the virtues of interrupting an OS
>> call for GC purposes <g>, can you point me towards any examples of
>> native code that correctly handles these signals today?  I'd like to
>> reuse a working example rather than hack something up.
>>
>> Regards,
>> Tim
>>
>>> Thanks!
>>>
>>> [1] http://markmail.org/thread/kbs7bfcnkcfggyc4
>>
> 
> 

Mime
View raw message