If I have a data structure for the Allegro threading API as shown in the example here:
https://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Threads
And I lock the mutex, is there a way to have one of the members of that data structure be a reference to an entire object that has read/write access to its public member functions locked?
That is to say, if I have a member variable which is a reference to a non POD-type object in that data structure, will locking the mutex restrict access to all of the object's members in another thread, or will it simply lock the reference itself from being modified?