On Sat, 27 Aug 2022 06:52:19 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Сергей Цыпанов has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - 8292937: Fix error C2057
>>  - 8292937: Remove unused method
>
> src/java.base/share/native/libjava/io_util.c line 108:
> 
>> 106:                 ((*(buf + 6) & 0xFF) << 8) +
>> 107:                 ((*(buf + 7) & 0xFF)));
>> 108:     }
> 
> Doing this in a JNI method is problematic for several reasons and I think we 
> should try to keep the JNI methods as simple/short as possible, ideally map 
> to a single syscall and not do too much if possible. In the medium/long term 
> then many of the native methods in this area will be replaced anyway, maybe 
> by re-implementing RAF/etc. on NIO, maybe by replacing the JNI code with the 
> java.lang.foreign APIs. In addition, I expect there will be another tranche 
> of changes that will significantly change this code for virtual threads to 
> allow the underlying thread be released when doing for file I/O.

So I should roll the changes to VM back and modify only Java code, right?

-------------

PR: https://git.openjdk.org/jdk/pull/10031

Reply via email to