EmbLogic's Blog

Creating threads

We can create threads using this function:

int pthread_create(pthread_t *thread, pthread_attr_t *attr,
void*(*start_routine)(void *),
void *arg);

*thread is a pointer to new thread, it points to a location where id of new thread will be written when the thread will be created. From now on, this thread id will be used for referring to new thread.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>