Rather than locking your type buffer, consider implementing a Load-Link Store-Conditional abstraction. Rather than worry about the state, just retry the whole chain if Store-Conditional fails.
The main benefit I see is it would potentially uncomplicate the code a lot. I'm not sure if it would be any faster, but it's conceivable it would.