diff options
Diffstat (limited to 'pjlib/src/pj/os_core_unix.c')
-rw-r--r-- | pjlib/src/pj/os_core_unix.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index 5fd630c1..0dba048e 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -179,6 +179,15 @@ PJ_DEF(pj_uint32_t) pj_getpid(void) } /* + * Check if this thread has been registered to PJLIB. + */ +PJ_DEF(pj_status_t) pj_thread_is_registered(void) +{ + return pj_thread_local_get(thread_tls_id) != 0; +} + + +/* * pj_thread_register(..) */ PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name, |