Updated intrinsics and spinlock
Added RWLOCK
Updated HAL_BOOT