add mutex_unlock_and_sleep()
fixed active_thread could avoid going to sleep
fix missing restore irqstate
fixed typo send->sends
fixed restoreIRQ() only once
applied brand new coding convention
fix add missing put thread to sleep in else branch
simplified going to sleep
add test for mutex_unlock_and_sleep()
fix astyled code and add doxy comments
declared global variables as static and/or volatile
adopted Makefile to #759
fix broken Makefile, added missing include
fixed indent