fix macro

add support for clang & intel compiler
add try unlock