updated the implementation of locker for posix
add locker for mac platform (OSSpinLock)
fixed bug of logging module for mac platform