pthread concepts in linux

Viewed 15523

I have some questions about pthreads in linux:

  1. Is it the case that pthread_t is it a datatype similar to int and char indicating we are defining a thread?
  2. If so, how much size does it take? 2 bytes or 4 bytes?
  3. Does the compiler allocate memory to pthread_t thread1 immediately after that statement or does it wait until it a pthread_create() call?
  4. How does one set the thread attributes, and what is their typical use?
  5. 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.

4 Answers
Related