I have some questions about pthreads in linux:
- Is it the case that
pthread_tis it a datatype similar tointandcharindicating we are defining a thread? - If so, how much size does it take? 2 bytes or 4 bytes?
- Does the compiler allocate memory to
pthread_t thread1immediately after that statement or does it wait until it apthread_create()call? - How does one set the thread attributes, and what is their typical use?
- Can one only pass more than one argument in the
pthread_create()call? If so, how?
I have lots of things on my mind like this. Please also feel free to suggest any good sites or documents to read.