title: JNI shared library not thread safe
body: <p>I have a native library which I want to use in my Java application. Multiple threads will be using the library as well as multiple Java processes will be using the same library as well. The library is written in C which I am currently compiling with MinGW on Windows. What synchronization mechanics should I use for synchronizing the non thread safe native library? </p>
  
  <p>Thanks in advance!</p>