some questions about FOO-threads.cc

Bryce McKinlay bryce@waitaki.otago.ac.nz
Tue Dec 11 17:56:00 GMT 2001


Adam Megacz wrote:
>Can anybody briefly let me know what each of these do? The source is a
>bit sparse on documentation, and they're not mentioned in the CNI spec.
>> _Jv_ThreadRegister
>This is called from java.lang.Thread to register the _Jv_Thread_t data 
(which is private/specific to each threads implementation but to which 
java.lang.Thread has an opaque pointer to) with the threads 
implementation. The implementation can use it to store the _Jv_Thread_t 
in such a way that _Jv_ThreadCurrent/_Jv_ThreadCurrentData will work. In 
the posix-threads implementation, we use the pthread_setspecific to 
save a reference to the _Jv_Thread_t in thread-specific data.
>_Jv_ThreadUnRegister
>Opposite of the above...
>_Jv_ThreadDestroyData
>Opposite of _Jv_ThreadInitData. Gives your implementation a chance to 
free/destroy any platform specific resources you allocated for this 
thread and saved in the _Jv_Thread_t. It is called when a 
java.lang.Thread is finalized.
regards
Bryce.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /