summaryrefslogtreecommitdiff
path: root/pjlib/src/pj
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj')
-rw-r--r--pjlib/src/pj/os_core_symbian.cpp17
-rw-r--r--pjlib/src/pj/os_core_unix.c14
-rw-r--r--pjlib/src/pj/os_core_win32.c15
3 files changed, 46 insertions, 0 deletions
diff --git a/pjlib/src/pj/os_core_symbian.cpp b/pjlib/src/pj/os_core_symbian.cpp
index 8f96ce09..f656cb68 100644
--- a/pjlib/src/pj/os_core_symbian.cpp
+++ b/pjlib/src/pj/os_core_symbian.cpp
@@ -447,6 +447,23 @@ PJ_DEF(pj_bool_t) pj_symbianos_poll(int priority, int ms_timeout)
/*
+ * pj_thread_is_registered()
+ */
+PJ_DEF(pj_bool_t) pj_thread_is_registered(void)
+{
+ return PJ_FALSE;
+}
+
+/*
+ * pj_thread_get_os_handle()
+ */
+PJ_DEF(void*) pj_thread_get_os_handle(pj_thread_t *thread)
+{
+ PJ_UNUSED_ARG(thread);
+ return NULL;
+}
+
+/*
* pj_thread_register(..)
*/
PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name,
diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c
index e901036a..5a246df5 100644
--- a/pjlib/src/pj/os_core_unix.c
+++ b/pjlib/src/pj/os_core_unix.c
@@ -238,6 +238,20 @@ PJ_DEF(pj_bool_t) pj_thread_is_registered(void)
#endif
}
+/*
+ * Get native thread handle
+ */
+PJ_DEF(void*) pj_thread_get_os_handle(pj_thread_t *thread)
+{
+ PJ_ASSERT_RETURN(thread, NULL);
+
+#if PJ_HAS_THREADS
+ return &thread->thread;
+#else
+ pj_assert("pj_thread_is_registered() called in non-threading mode!");
+ return NULL;
+#endif
+}
/*
* pj_thread_register(..)
diff --git a/pjlib/src/pj/os_core_win32.c b/pjlib/src/pj/os_core_win32.c
index b9484ff5..fcacaf4b 100644
--- a/pjlib/src/pj/os_core_win32.c
+++ b/pjlib/src/pj/os_core_win32.c
@@ -245,6 +245,21 @@ PJ_DEF(pj_bool_t) pj_thread_is_registered(void)
}
/*
+ * Get native thread handle
+ */
+PJ_DEF(void*) pj_thread_get_os_handle(pj_thread_t *thread)
+{
+ PJ_ASSERT_RETURN(thread, NULL);
+
+#if PJ_HAS_THREADS
+ return thread->hthread;
+#else
+ pj_assert("pj_thread_is_registered() called in non-threading mode!");
+ return NULL;
+#endif
+}
+
+/*
* pj_thread_register(..)
*/
PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name,