I read some codes as below:
void
mcachefs_file_start_thread()
{
pthread_attr_t attrs;
pthread_attr_init(&attrs);
pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_JOINABLE);
pthread_create(&mcachefs_file_threadid, &attrs, mcachefs_file_thread, NULL);
}
Here, what is the usage of setting attrs as PTHREAD_CREATE_JOINABLE? Besides, isn't it the default attribute of a thread created by pthead_create?