The current declaration is:
jint AttachCurrentThread(JavaVM *vm, void **p_env, void *thr_args);
but p_env must be a JNIEnv**, and thr_args must be a JavaVMAttachArgs* so we should declare them as such.
There are also number of inconsistencies in parameter naming e.g. penv vs. p_env, and vm vs p_vm, that should be made consistent across the invocation API. Some grammatical improvements in parameter descriptions can also be made e.g.
`vm`: the VM to which the current thread will be attached, must not be `NULL`.
should read:
`vm`: the VM to which the current thread will be attached. It must not be `NULL`.