It looks like the code to push the pthread_mutex_unlock function onto the thread's cleanup stack via pthread_cleanup_push makes the code snippet work because otherwise the thread would grab the shared lock and be forced to exit without releasing it. By pushing the pthread_mutex_unlock function onto the cleanup stack, the thread is ensuring that the mutex will get unlocked when the thread exits, even if the exit is forced and the pthread_cleanup_pop function is not hit. In essence the cleanup queue gives you the ability to ensure code gets executed / resources are freed / etc upon exit.
The pthread_cleanup_pop function just calls the top function on the cleanup stack, while exiting calls all the functions on the cleanup stack. See the man of pthread_cleaup_push for more info.
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.