I am developing a shared library(.so) and dll. I have a global variable which is updated in multiple threads. So I have mutex lock for synchronization.
I am not clear whether global data in shared library is shared across process. If it is then I need to use semaphores for synchronization. As I understand global variables are part of data segment so I wanted to understand how dll manages the global data across processes. Any information w.r.t. dll format and segment will be helpful.
Thanks.