Click to See Complete Forum and Search --> : PTHREAD_MUTEX_INITIALIZER being typeless


Yadrif
April 2nd, 2009, 11:31 AM
I found a comment in code stating that PTHREAD_MUTEX_INITIALIZER is typeless then the following code:


const pthread_mutex_t pthread_mutex_initer = PTHREAD_MUTEX_INITIALIZER;


then pthread_mutex_initer is used to initialize a pthread_mutex_t member variable.

What is meant by is typeless in this context? And why do they need the above code?

Thanks for the help.

Codeplug
April 3rd, 2009, 02:21 AM
>> then pthread_mutex_initer is used to initialize a pthread_mutex_t member variable.
What do you mean? Simple assignment of 'pthread_mutex_initer' to another pthread_mutex_t?

gg