Problems with pthread mutexes - update

Arash Partow arashp@hotmail.com
Mon Sep 27 09:36:00 GMT 2004


Hi all,

This is a follow up to the setting mutex attribute issue, it turns
out Brian was correct, by zeroing off the pthread_mutexattr_t with
memset all the nastiness seems to go away...

The following code which doesn't exhibit the previously mentioned
error:

  int result = 0;
  pthread_mutexattr_t mutex_attr;
  memset(&mutex_attr,0,sizeof(mutex_attr));

  if ((result = pthread_mutexattr_init(&mutex_attr)) != 0)
  {
     printf("Error - Description: %s\n",stderror(result));
     exit(EXIT_FAILURE);
  }




Arash Partow
__________________________________________________
Be one who knows what they don't know,
Instead of being one who knows not what they don't know,
Thinking they know everything about all things.
http://www.partow.net



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list