Positive error number on error does not set errno

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e error number on error. Does not set errno !!! Thread ID is returned in tid pthread_attr_t *attr Thread attributes can be set using attr, including detached state and scheduling policy. You can specify NULL and get the system defaults. Thread IDs Each thread has a unique ID, a thread can find out it's ID by calling pthread_self(). Thread IDs are of type pthread_t which is usually an unsigned int. When debugging, it's often useful to do something like this: printf("Thread %u:\n",pthread_self()); Thread Arguments When func() is called the value arg specified in the call to pthread_create() is passed as a parameter. func can have only 1 parameter, and it can't be larger than the size of a void *. Th...
View Full Document

Ask a homework question - tutors are online