EmbLogic's Blog

How to change the thread attributes ?

We can change the thread attributes by modifying the pthread_attr_t structure.

Generally we give NULL in pthread_create , so it takes default attributes while creating a thread , but we can modify this by giving a pointer pointing to pthread_attr_t structure instead of giving null i:e;

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

 

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>