[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mico-devel
Subject:    RE: [mico-devel] Installation Problem - XP/Cygwin/MICO2.3.11
From:       "Joost Kraaijeveld" <J.Kraaijeveld () Askesis ! nl>
Date:       2003-12-25 7:46:56
[Download RAW message or body]

Hi Fayez,


> result = pthread_mutex_init(&_mutex, &m_attr);
> assert(!result);        
This is because pthread_mutex_init returns EBUSY if yout try to call it twice for the \
same mutex. For a complete discussion see \
http://sources.redhat.com/ml/cygwin/2003-06/msg00431.html and \
http://www.opengroup.org/onlinepubs/007904975/functions/pthread_mutexattr_init.html . \
The checking is done with the Windows funtion IsBadWritePtr(). This function tries to \
write to the memory occupied by &m_attr: if it points to something owned by the \
process it returns true, false otherwise. Because m_attr is not initialised with a \
proper value in line 284 of pthreads.cc it points to memory not owned by the process. \
You can use memset to initialize m_attr to 0 after its declaration:

--> line 284: pthread_mutexattr_t m_attr;
--> add this: memset (&m_attr, 0, sizeof(m_attr));

But even if you change this, it is at this moment not possible to run MICO \
multithreaded with current public release of Cygwin. I have not figured out yet if \
this is a MICO or Cygwin problem: the debugger into code where no man has gone before \
(there is no connection between what the debugger shows and the code that is actually \
run).

You may try the current Cygwin snapshot allthought there are still some thread \
related issues in that version.

> Could anyone let me know what the problem may be? Also, if I am not using 
> --enable-pthreads option during configuration, then why is it using the pthread \
> API?
I thought you used --enable-pthreads according to your email?

Bye

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl 
_______________________________________________
Mico-devel mailing list
Mico-devel@mico.org
http://www.mico.org/mailman/listinfo/mico-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic