Make set_/__throw_constraint_handler_s thread-safe.
Move __throw prototype into libc_private.h.
Minor style editings.
Well, I cannot free the memory there, see the updated comment above the definition of '_ch'. If going into this direction, either memory should not be allocated (could you, please, point to the rationale text ?) or lock used instead of lockless algorithm.
I thought that the set interface is used rarely so that the leak is not important.
Instead of atomics, a mutex would work.
Most implementations will probably use a pointer to function in their implementation of the set_constraint_handler_s function to hold the address of the currently