Fix the lockup in the lock code.  Use upc_fence to flush the cache
and re-read the shared variable in the local space.