Use propper macros for the locking