[THREAD] Added a ThreadTag api to support libc reentrancy.