Sharing mutexes between modules?

You can use mutex just like you declare and use extern variable "current position". No big difference here.

You can use mutex just like you declare and use extern variable "current position". No big difference here. Extern pthread_mutex_t mtx; extern int current_position.

Mutex is is usually used with a pointer to mutex object. So, you must pass the pointer to same object into both modules and then you can use mutex as usual. You can add extern mutex_type mutex1; declaration of mutex pointer into header file common to both modules but define it in one module with mutex_type mutex1;.

Then you can use &mutex1 in both modules.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions