-struct ucwlib_context *
-ucwlib_thread_context(void)
-{
- struct ucwlib_context *c = pthread_getspecific(ucwlib_context_key);
- if (!c)
- {
- c = xmalloc_zero(sizeof(*c));
- c->thread_id = ucwlib_tid();
- pthread_setspecific(ucwlib_context_key, c);
- }
- return c;
-}