Alan,
On 25/05/18 12:27, Alan Bateman wrote:
On 24/05/2018 21:57, Ivan Gerasimov wrote:
..
WEBREV: http://cr.openjdk.java.net/~igerasim/8203369/00/webrev/
The changes in 01/webrev look okay to me but I'm curious if there are
any ports in OpenJDK where the values are different.
HPUX 11.31 (
On 24/05/2018 21:57, Ivan Gerasimov wrote:
Hello!
On Unix systems several system calls (including pread, read, readv,
recvfrom, recvmsg, send, sendfile, sendmsg, sendto) may set errno to
either EAGAIN or EWOULDBLOCK on the same condition.
On Linux these two constants are the same, but they a
On 25/05/2018 4:14 PM, Ivan Gerasimov wrote:
Hi David!
If gcc, then we already have the same test for both constants in code
with no issues.
For example, java.base/unix/native/libnet/SocketInputStream.c, in
NET_ReadWithTimeout():
result = NET_NonBlockingRead(fd, bufP, len);
On 5/24/18 10:25 PM, Weijun Wang wrote:
https://stackoverflow.com/questions/27509061/macro-to-avoid-duplicate-case-value
Someone has already used them in a switch expression...
Interesting!
I like the very first solution:
#if EAGAIN != EWOULDBLOCK
case EAGAIN:
#endif
case EWOULD
Hi David!
If gcc, then we already have the same test for both constants in code
with no issues.
For example, java.base/unix/native/libnet/SocketInputStream.c, in
NET_ReadWithTimeout():
result = NET_NonBlockingRead(fd, bufP, len);
if (result == -1 && ((errno == EAGAIN) || (err
On Friday 25 May 2018 11:19 AM, Ivan Gerasimov wrote:
Hi Wiijun!
On 5/24/18 10:13 PM, Weijun Wang wrote:
On May 25, 2018, at 11:58 AM, Ivan Gerasimov
wrote:
I also wonder whether a smart compiler might not flag code where
the errors do infact have the same value:
if (errno == 11 || e
Hi Wiijun!
On 5/24/18 10:13 PM, Weijun Wang wrote:
On May 25, 2018, at 11:58 AM, Ivan Gerasimov wrote:
I also wonder whether a smart compiler might not flag code where the errors do
infact have the same value:
if (errno == 11 || errno == 11) ...
At least gcc -O completely removes the s
On 25/05/2018 3:34 PM, Ivan Gerasimov wrote:
Hi David!
On 5/24/18 9:45 PM, David Holmes wrote:
I looked but did not review - it was just an observation :)
Well, thank you anyway :)
It seems pointless to double up these condition checks everywhere
just in case there is some platform (do
Hi David!
On 5/24/18 9:45 PM, David Holmes wrote:
I looked but did not review - it was just an observation :)
Well, thank you anyway :)
It seems pointless to double up these condition checks everywhere
just in case there is some platform (do we know of one?) where this
may be necessary
https://stackoverflow.com/questions/27509061/macro-to-avoid-duplicate-case-value
Someone has already used them in a switch expression...
> On May 25, 2018, at 12:45 PM, David Holmes wrote:
>
>>> I also wonder whether a smart compiler might not flag code where the errors
>>> do infact have the
> On May 25, 2018, at 11:58 AM, Ivan Gerasimov
> wrote:
>
>> I also wonder whether a smart compiler might not flag code where the errors
>> do infact have the same value:
>>
>> if (errno == 11 || errno == 11) ...
>>
> At least gcc -O completely removes the second redundant test, so no
> ob
Hi Ivan,
On 25/05/2018 1:58 PM, Ivan Gerasimov wrote:
Hi David!
Thank you for reviewing the fix!
I looked but did not review - it was just an observation :)
On 5/24/18 7:44 PM, David Holmes wrote:
Hi Ivan,
Just a thought, but just because the actual native function may return
either cod
Hi David!
Thank you for reviewing the fix!
On 5/24/18 7:44 PM, David Holmes wrote:
Hi Ivan,
Just a thought, but just because the actual native function may return
either code, that doesn't mean our native wrapper can't treat them the
same and present them to the Java code as one error?
Cu
Hi Ivan,
Just a thought, but just because the actual native function may return
either code, that doesn't mean our native wrapper can't treat them the
same and present them to the Java code as one error?
It seems pointless to double up these condition checks everywhere just
in case there is
Hello!
On Unix systems several system calls (including pread, read, readv,
recvfrom, recvmsg, send, sendfile, sendmsg, sendto) may set errno to
either EAGAIN or EWOULDBLOCK on the same condition.
On Linux these two constants are the same, but they are not required to
be the same.
For examp
15 matches
Mail list logo