This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: some questions about FOO-threads.cc


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]