Re: Error while using pthreads
"Vijaya Kumar B.H." <bhvijaykumar@gmail.com> writes:
> I am trying to compile pthread application , but getting the following
> error . I think this is a bug in GCC libraries.
...
> connEntities[connid]->rcvWinFillMutex = PTHREAD_MUTEX_INITIALIZER;
It looks to me like your code is wrong -- PTHREAD_MUTEX_INITIALIZER is
only defined to work as a static initializer, not in an assignment. In
code, you can use the pthread_mutex_init function instead.
-Miles
--
Run away! Run away!
Reply to: