pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJLIB Reference

os.h File Reference


Detailed Description

OS dependent functions.

Go to the source code of this file.

Data Structures

struct  pj_symbianos_params

Defines

#define PJ_THREAD_DESC_SIZE   (64)
#define PJ_CHECK_STACK()
#define pj_thread_get_stack_max_usage(thread)   0
#define pj_thread_get_stack_info(thread, f, l)   (*(f)="",*(l)=0)
#define pj_mutex_is_locked(mutex)   1

Typedefs

typedef long pj_thread_desc [(64)]
typedef struct pj_rwmutex_t pj_rwmutex_t

Enumerations

enum  pj_thread_create_flags { PJ_THREAD_SUSPENDED = 1 }
enum  pj_mutex_type_e { PJ_MUTEX_DEFAULT, PJ_MUTEX_SIMPLE, PJ_MUTEX_RECURSE }

Functions

typedef int (PJ_THREAD_FUNC pj_thread_proc)(void *)
pj_uint32_t pj_getpid (void)
pj_status_t pj_thread_create (pj_pool_t *pool, const char *thread_name, pj_thread_proc *proc, void *arg, pj_size_t stack_size, unsigned flags, pj_thread_t **thread)
pj_status_t pj_thread_register (const char *thread_name, pj_thread_desc desc, pj_thread_t **thread)
pj_bool_t pj_thread_is_registered (void)
int pj_thread_get_prio (pj_thread_t *thread)
pj_status_t pj_thread_set_prio (pj_thread_t *thread, int prio)
int pj_thread_get_prio_min (pj_thread_t *thread)
int pj_thread_get_prio_max (pj_thread_t *thread)
void * pj_thread_get_os_handle (pj_thread_t *thread)
const char * pj_thread_get_name (pj_thread_t *thread)
pj_status_t pj_thread_resume (pj_thread_t *thread)
pj_thread_tpj_thread_this (void)
pj_status_t pj_thread_join (pj_thread_t *thread)
pj_status_t pj_thread_destroy (pj_thread_t *thread)
pj_status_t pj_thread_sleep (unsigned msec)
pj_bool_t pj_symbianos_poll (int priority, int ms_timeout)
pj_status_t pj_symbianos_set_params (pj_symbianos_params *prm)
pj_status_t pj_thread_local_alloc (long *index)
void pj_thread_local_free (long index)
pj_status_t pj_thread_local_set (long index, void *value)
void * pj_thread_local_get (long index)
pj_status_t pj_atomic_create (pj_pool_t *pool, pj_atomic_value_t initial, pj_atomic_t **atomic)
pj_status_t pj_atomic_destroy (pj_atomic_t *atomic_var)
void pj_atomic_set (pj_atomic_t *atomic_var, pj_atomic_value_t value)
pj_atomic_value_t pj_atomic_get (pj_atomic_t *atomic_var)
void pj_atomic_inc (pj_atomic_t *atomic_var)
pj_atomic_value_t pj_atomic_inc_and_get (pj_atomic_t *atomic_var)
void pj_atomic_dec (pj_atomic_t *atomic_var)
pj_atomic_value_t pj_atomic_dec_and_get (pj_atomic_t *atomic_var)
void pj_atomic_add (pj_atomic_t *atomic_var, pj_atomic_value_t value)
pj_atomic_value_t pj_atomic_add_and_get (pj_atomic_t *atomic_var, pj_atomic_value_t value)
pj_status_t pj_mutex_create (pj_pool_t *pool, const char *name, int type, pj_mutex_t **mutex)
pj_status_t pj_mutex_create_simple (pj_pool_t *pool, const char *name, pj_mutex_t **mutex)
pj_status_t pj_mutex_create_recursive (pj_pool_t *pool, const char *name, pj_mutex_t **mutex)
pj_status_t pj_mutex_lock (pj_mutex_t *mutex)
pj_status_t pj_mutex_unlock (pj_mutex_t *mutex)
pj_status_t pj_mutex_trylock (pj_mutex_t *mutex)
pj_status_t pj_mutex_destroy (pj_mutex_t *mutex)
pj_status_t pj_rwmutex_create (pj_pool_t *pool, const char *name, pj_rwmutex_t **mutex)
pj_status_t pj_rwmutex_lock_read (pj_rwmutex_t *mutex)
pj_status_t pj_rwmutex_lock_write (pj_rwmutex_t *mutex)
pj_status_t pj_rwmutex_unlock_read (pj_rwmutex_t *mutex)
pj_status_t pj_rwmutex_unlock_write (pj_rwmutex_t *mutex)
pj_status_t pj_rwmutex_destroy (pj_rwmutex_t *mutex)
void pj_enter_critical_section (void)
void pj_leave_critical_section (void)
pj_status_t pj_sem_create (pj_pool_t *pool, const char *name, unsigned initial, unsigned max, pj_sem_t **sem)
pj_status_t pj_sem_wait (pj_sem_t *sem)
pj_status_t pj_sem_trywait (pj_sem_t *sem)
pj_status_t pj_sem_post (pj_sem_t *sem)
pj_status_t pj_sem_destroy (pj_sem_t *sem)
pj_status_t pj_event_create (pj_pool_t *pool, const char *name, pj_bool_t manual_reset, pj_bool_t initial, pj_event_t **event)
pj_status_t pj_event_wait (pj_event_t *event)
pj_status_t pj_event_trywait (pj_event_t *event)
pj_status_t pj_event_set (pj_event_t *event)
pj_status_t pj_event_pulse (pj_event_t *event)
pj_status_t pj_event_reset (pj_event_t *event)
pj_status_t pj_event_destroy (pj_event_t *event)
pj_status_t pj_gettimeofday (pj_time_val *tv)
pj_status_t pj_time_decode (const pj_time_val *tv, pj_parsed_time *pt)
pj_status_t pj_time_encode (const pj_parsed_time *pt, pj_time_val *tv)
pj_status_t pj_time_local_to_gmt (pj_time_val *tv)
pj_status_t pj_time_gmt_to_local (pj_time_val *tv)
pj_status_t pj_get_timestamp (pj_timestamp *ts)
pj_status_t pj_get_timestamp_freq (pj_timestamp *freq)
void pj_set_timestamp32 (pj_timestamp *t, pj_uint32_t hi, pj_uint32_t lo)
int pj_cmp_timestamp (const pj_timestamp *t1, const pj_timestamp *t2)
void pj_add_timestamp (pj_timestamp *t1, const pj_timestamp *t2)
void pj_add_timestamp32 (pj_timestamp *t1, pj_uint32_t t2)
void pj_sub_timestamp (pj_timestamp *t1, const pj_timestamp *t2)
void pj_sub_timestamp32 (pj_timestamp *t1, pj_uint32_t t2)
pj_int32_t pj_timestamp_diff32 (const pj_timestamp *t1, const pj_timestamp *t2)
pj_time_val pj_elapsed_time (const pj_timestamp *start, const pj_timestamp *stop)
pj_uint32_t pj_elapsed_msec (const pj_timestamp *start, const pj_timestamp *stop)
pj_uint32_t pj_elapsed_usec (const pj_timestamp *start, const pj_timestamp *stop)
pj_uint32_t pj_elapsed_nanosec (const pj_timestamp *start, const pj_timestamp *stop)
pj_uint32_t pj_elapsed_cycle (const pj_timestamp *start, const pj_timestamp *stop)
pj_status_t pj_thread_init (void)


Function Documentation

pj_status_t pj_thread_init ( void   ) 

Internal PJLIB function to initialize the threading subsystem.

Returns:
PJ_SUCCESS or the appropriate error code.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
(C)2001-2008 Benny Prijono