Implementing atomic primitive helper LLX/SCX following the algorithm presented by Brown et al.