The implementation is written in assembler, in the file asm.s. In the current implementation it just jumps to the implementation in the runtime/internal/atomic package. In that package, for most targets, look at the atomic_GOARCH.s file.
It's not normally implemented using a mutex, it's normally implemented using processor-specific atomic instructions.
And I'll add that actually the implementation in runtime/internal/atomic isn't normally used, normally the function is implemented directly by the compiler.
Ian