mutual exclusion implementation 8578221