Implement the os_unfair_lock functions on macOS
#3745
Merged
os_unfair_lock functions on macOS
#3745