diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-10-04 20:46:27 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-10-04 20:46:27 +0000 |
commit | 64fd508e231e690a69a659f1c1a862767d6b2ad2 (patch) | |
tree | 18f0aef5c136416e61398ffe2ed61d7cf0276d2e /pjlib/src/pj/os_core_unix.c | |
parent | af44aa1e2566d0cee73953352ab7a37514154d81 (diff) |
Fixed compilation errors when threading is disabled (PJ_HAS_THREADS=0) and safe ioqueue unregistration is disabled (PJ_IOQUEUE_HAS_SAFE_UNREG=0). Also increase PJ_IOQUEUE_MAX_HANDLES for minimum config to 16 in config_sample.h [thanks Olivier Gournet].
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@750 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/os_core_unix.c')
-rw-r--r-- | pjlib/src/pj/os_core_unix.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index c7ea2594..a65c8e89 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -184,7 +184,12 @@ PJ_DEF(pj_uint32_t) pj_getpid(void) */ PJ_DEF(pj_bool_t) pj_thread_is_registered(void) { +#if PJ_HAS_THREADS return pj_thread_local_get(thread_tls_id) != 0; +#else + pj_assert("pj_thread_is_registered() called in non-threading mode!"); + return PJ_TRUE; +#endif } @@ -944,7 +949,8 @@ PJ_DEF(pj_status_t) pj_mutex_create(pj_pool_t *pool, *ptr_mutex = mutex; return PJ_SUCCESS; #else /* PJ_HAS_THREADS */ - return (pj_mutex_t*)1; + *ptr_mutex = (pj_mutex_t*)1; + return PJ_SUCCESS; #endif } |