[capi-sig] How to initialize state for C created threads