C language software solutions for mutual exclusion