Skip to content

Instantly share code, notes, and snippets.

@epickrram
Created June 4, 2015 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epickrram/9d06dfe88ec53a176f70 to your computer and use it in GitHub Desktop.
Save epickrram/9d06dfe88ec53a176f70 to your computer and use it in GitHub Desktop.
FileDispatcherImpl.pwrite0()
/*
From http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c#l111
*/
Java_sun_nio_ch_FileDispatcherImpl_pwrite0(JNIEnv *env, jclass clazz, jobject fdo,
jlong address, jint len, jlong offset)
{
jint fd = fdval(env, fdo);
void *buf = (void *)jlong_to_ptr(address);
return convertReturnVal(env, pwrite64(fd, buf, len, offset), JNI_FALSE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment