Added pj_thread_is_registered
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@674 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
e9db7003c3
commit
d6b90f5082
|
@ -129,6 +129,14 @@ PJ_DECL(pj_status_t) pj_thread_register ( const char *thread_name,
|
|||
pj_thread_desc desc,
|
||||
pj_thread_t **thread);
|
||||
|
||||
/**
|
||||
* Check if this thread has been registered to PJLIB.
|
||||
*
|
||||
* @return Non-zero if it is registered.
|
||||
*/
|
||||
PJ_DECL(pj_status_t) pj_thread_is_registered(void);
|
||||
|
||||
|
||||
/**
|
||||
* Get thread name.
|
||||
*
|
||||
|
|
|
@ -178,6 +178,15 @@ PJ_DEF(pj_uint32_t) pj_getpid(void)
|
|||
return getpid();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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(..)
|
||||
*/
|
||||
|
|
|
@ -185,6 +185,14 @@ PJ_DEF(pj_uint32_t) pj_getpid(void)
|
|||
return GetCurrentProcessId();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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(..)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue