Avoid mutex from trap context