change type definition from BOOL to bool
change type definition from unsigned int to uint32_t
modify function definitions of MUTEX