title: Is linux' "mutex lock" implemented using "memory barrier"?
body: <p>I was reading <a href="https://www.quora.com/Why-can-a-mutex-be-used-as-a-memory-barrier" rel="nofollow noreferrer">this</a> where Robert Love mentioned that mutex is implemented using memory barrier but I am not able to see the memory barrier instructions being used in <a href="http://lxr.free-electrons.com/source/kernel/locking/mutex.c#L95" rel="nofollow noreferrer">Linux implementation</a> of mutex lock.</p>
  <p>I was wondering if he was referring to mutex lock implementation in posix library which does use memory barrier instruction so that it doesn't get reordered with respect to the critical resource. Am I right?</p>