added barrier_all before shm-memory functions return according to the spec...and modified shmemalign according to spec