Update spinlock.c, _atomic.s

Also added memory, synchronization barrier functions
Spinlocks now support read, write locks
Added barriers in spinlock code to ensure proper memory access order
Updated _atomic.s functions to set a specified value or bit