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);