summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/os_core_unix.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-11-21 14:12:01 +0000
committerBenny Prijono <bennylp@teluu.com>2007-11-21 14:12:01 +0000
commit5931dc59c08af2cf1f23518f700e9107effa9e59 (patch)
tree82f144feae2c2eb35b1f65f9edc156365152e347 /pjlib/src/pj/os_core_unix.c
parent7cea28ab2a2d6dadb0ef3aaa6a3194e45f98cba5 (diff)
Ticket #417: added pjlib API to retrieve the native thread handle from pj_thread_t
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1589 74dad513-b988-da41-8d7b-12977e46ad98
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(..)