Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the native linux methods in openjdk?

Tags:

java

linux

I am trying to find native method implementation for linux:

private native int socketRead0(FileDescriptor fd,
                                   byte b[], int off, int len,
                                   int timeout)

I could not find it in Openjdk source files. I grepped all the files for "socketRead0" but it found only implementations for windows and solaris. Where is it?

like image 937
user3364192 Avatar asked Apr 10 '26 17:04

user3364192


1 Answers

socketRead0 implementation for Linux is defined in the Solaris version: SocketInputStream.c. This file includes net_util.h which in turn includes net_util_md.h.

net_util_md.h uses a #ifdef __linux__ directive to distinguish between Linux and Solaris

like image 70
vsnyc Avatar answered Apr 12 '26 07:04

vsnyc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!