Typedefs | |
typedef void *(*) | IX_START_FCT (void *) |
prototype of function which is executed in thread | |
typedef void(*) | IX_EXIT_FCT (void *pt) |
prototpye of function which is executed when thread is finished (argument is pointer to ix_thread_t) | |
typedef ix_thread_s | ix_thread_t |
handle to ix thread | |
Functions | |
ix_thread_t * | ix_thread_new (IX_START_FCT sfct, IX_EXIT_FCT efct, void *parg, char *name) |
int | ix_thread_stop (ix_thread_t *pt) |
void | ix_thread_exit (ix_thread_t *pt) |
void | ix_thread_free (ix_thread_t *pt) |
void * | ix_thread_getarg (ix_thread_t *pt) |
char * | ix_thread_getname (ix_thread_t *pt) |
void ix_thread_exit | ( | ix_thread_t * | pt | ) |
should be called at end of thread execution in end function
pt | ix thread handle |
void ix_thread_free | ( | ix_thread_t * | pt | ) |
frees memory allocated to thread
pt | ix thread handle |
void* ix_thread_getarg | ( | ix_thread_t * | pt | ) |
returns user-data in start-fct start-fct gets ix_thread_t pointer as argument
pt | ix thread handle |
char* ix_thread_getname | ( | ix_thread_t * | pt | ) |
returns thread name given in ix_thread_new
pt | ix thread handle |
ix_thread_t* ix_thread_new | ( | IX_START_FCT | sfct, | |
IX_EXIT_FCT | efct, | |||
void * | parg, | |||
char * | name | |||
) |
creates new thread and starts execution of start-function
sfct | start function | |
efct | exit function | |
parg | userdata (to get userdata in start-fct call parg = ix_thread_getarg( start-fct-arg ); | |
name | just a name for debugging purpose |
int ix_thread_stop | ( | ix_thread_t * | pt | ) |
stops thread execution
pt | ix thread handle |