How to create a thread in C Android NDK
-
My development environment is Eclipse C Android NDK I want to create and run a Simple thread from a function I am trying to use
pthread_create()
Can some one point me to a simple thread example C Android What I tired and confusing for me is, what parms I need to pass to this function ?
JNIEXPORT void JNICALL
Java_org_testjni_android_Game_someFunction(JNIEnv * env, jobject obj)
{ -
My development environment is Eclipse C Android NDK I want to create and run a Simple thread from a function I am trying to use
pthread_create()
Can some one point me to a simple thread example C Android What I tired and confusing for me is, what parms I need to pass to this function ?
JNIEXPORT void JNICALL
Java_org_testjni_android_Game_someFunction(JNIEnv * env, jobject obj)
{ -
My development environment is Eclipse C Android NDK I want to create and run a Simple thread from a function I am trying to use
pthread_create()
Can some one point me to a simple thread example C Android What I tired and confusing for me is, what parms I need to pass to this function ?
JNIEXPORT void JNICALL
Java_org_testjni_android_Game_someFunction(JNIEnv * env, jobject obj)
{As Richard pointed out, there (should be) no need to export to the
Java
environment thepthread_create
function. Make a wrapper (with a simpler signature) for that and then export toJava
(if you need to) such a wrapper. As aboutpthread_create
, its very man page[^] provides sample code.