Modified pizOSAtomic.c