Getting "UnsatisfiedLinkError" in io_uring for methods that were defined as "static inline" in the header

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Sep 21 23:07:26 UTC 2022


On 21/09/2022 23:39, Gavin Ray wrote:
> Do you anticipate any issues with using in/out-pointers as things get 
> passed back and forth from native to Java?
> I tried to write a draft of how I think the translation of a "hello 
> world" io_uring program should be:
>
> :https://gist.github.com/GavinRay97/8ea0997693c00f8df61968a98ba30135#file-io_uring-java 
> <https://urldefense.com/v3/__http://https:/*gist.github.com/GavinRay97/8ea0997693c00f8df61968a98ba30135*file-io_uring-java__;LyM!!ACWV5N9M2RV99hQ!L8dY2bzC0wLnLE9AOqucfrKON0_Fp60tZ6YH_ZAjZgNAkGw1vxjtieDXLBuEm7i5WIvPjgZlJTkBrH3RHb_y9IqkSVkX$>

Eyeballing the code (but it's late here :-) ) looks a good translation 
of the C code.

I noticed a bunch of calls to `.address()` which might be redundant. 
Assuming you are working on 19, MemorySegment implements Addressable, 
and the functions generated by jextract accept an Addressable when a 
pointer is expected. So you should be able to pass the segment "as is".

Other than that it looks good.

Maurizio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20220922/57260e63/attachment.htm>


More information about the panama-dev mailing list