I am running Linux, and I would like to be able to make parallel function calls into a shared library (.so) which is unfortunately not threadsafe (I am guessing it has globa
You can load multiple independent copies of the library like this:
#define _GNU_SOURCE #include ... void *handle = dlmopen(LM_ID_NEWLM, "/path/to/library.so", RTLD_NOW);
More info here.