summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/os_core_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj/os_core_unix.c')
-rw-r--r--pjlib/src/pj/os_core_unix.c14
1 files changed, 14 insertions, 0 deletions
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(..)