libosip  5.3.0
Classes | Functions
oSIP Thread Routines

Classes

struct  osip_thread
 

Functions

struct osip_threadosip_thread_create (int stacksize, void *(*func)(void *), void *arg)
 
int osip_thread_join (struct osip_thread *thread)
 
int osip_thread_set_priority (struct osip_thread *thread, int priority)
 
void osip_thread_exit (void)
 

Detailed Description

Function Documentation

◆ osip_thread_create()

struct osip_thread* osip_thread_create ( int  stacksize,
void *(*)(void *)  func,
void *  arg 
)

Allocate (or initialise if a thread address is given)

Parameters
stacksizeThe stack size of the thread. (20000 is a good value)
funcThe method where the thread start.
argA pointer on the argument given to the method 'func'.

◆ osip_thread_exit()

void osip_thread_exit ( void  )

Exit from a thread.

◆ osip_thread_join()

int osip_thread_join ( struct osip_thread thread)

Join a thread.

Parameters
threadThe thread to join.

◆ osip_thread_set_priority()

int osip_thread_set_priority ( struct osip_thread thread,
int  priority 
)

Set the priority of a thread. (NOT IMPLEMENTED ON ALL SYSTEMS)

Parameters
threadThe thread to work on.
priorityThe priority value to set.