Don't use static locals or global variables, even TLS will not help you with recursion / reentrancy.
Restore all your invariants before doing callbacks.
Don't hold locks while you do callbacks. If you absolutely must (and I would still go looking for a way to avoid it) then make sure you know what happens if you try to re-enter your lock on the thread that already holds it. At a minimum you have to test for this, otherwise depending on the lock you'll get deadlocks or broken invariants (i.e. corruption).