You might run into issues if the thread you have created is not "attached" - i.e. you need to call some internal functions first so that the JNI environment is setup correctly from this thread.
See attachThread and dvmAttachCurrentThread in dalvik/vm/Jni.c There might be other issues as well, but I'm not aware of any right now. Cheers, Nigel On Sat, Aug 20, 2011 at 6:06 AM, chipantang <[email protected]> wrote: > Hi, > > This perhaps is a basic question. I see Android framework provides > AndroidRuntime::javaCreateThreadEtc(), so that the threads created > with it get "hooked into VM before it really starts executing", per > comment in the source code. I would like to understand what would be > the differences if I simply used pthread_create instead? I would > think it is still possible to pathred_create a thread and then call a > jni function from there back to Java. No? > > Thanks, > > Kevin > > -- > unsubscribe: [email protected] > website: http://groups.google.com/group/android-porting > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
