D
Drazen Gemic
This might not be the correct newsgroup for this question, but I am just
not sure. I need some starting point.
I am trying to call some third party C code via JNI. It appears to be
working. The operating system is Linux. Third party code was meant to
be a command line program, but I managed to create shared library.
The code is huge, spread across multiple ".c" and ".h" files, and I
wonder is it thread safe, because Java code will be multithreaded. The
questions are:
- if it contains global variables do all threads share the same instance
of the global C variable, or they are "per thread" ?
- if it contains global static C variables do all threads share the same
instance of the global C variable, or they are "per thread" ?
- what about static C variables in C functions ?
thanks in advance
DG
not sure. I need some starting point.
I am trying to call some third party C code via JNI. It appears to be
working. The operating system is Linux. Third party code was meant to
be a command line program, but I managed to create shared library.
The code is huge, spread across multiple ".c" and ".h" files, and I
wonder is it thread safe, because Java code will be multithreaded. The
questions are:
- if it contains global variables do all threads share the same instance
of the global C variable, or they are "per thread" ?
- if it contains global static C variables do all threads share the same
instance of the global C variable, or they are "per thread" ?
- what about static C variables in C functions ?
thanks in advance
DG