| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Date: | Sat, 7 Jun 2003 14:24:49 +0200 |
| From: | Rasmus Hahn <rassahah AT neofonie DOT de> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Problem w/ c++,threads,static initializers |
| Message-ID: | <20030607142449.A4909@hamburg.neofonie.local> |
| Mime-Version: | 1.0 |
| User-Agent: | Mutt/1.2.5i |
Hello, i am using cygwin on my Windows2000 and my c++ program segfaults when using pthread-mutexes. In particular i am using a lot of mutexes from within constructors of static objects. These constructors are called at a very early time of execution of the program and do calls of pthread_mutex_init, pthread_mutex_lock and such. Taken a glance at the cygwin source i noticed that the static initializers (constructors of static objects) are run _before_ some user_data->threadinterface is initialized (look at dll_crt0_1 () in winsup/cygwin/dcrt0.cc). Isnt it possible to use thread-functions from static initializers? BTW i am using cygwin snapshot 20030602 compiled with gcc-3.3 since the out-of-the-box gcc from the cygwin-package is a prerelease and definitely contains bugs that do not allow it to compile my code. Greetings - Rasmus -- -- 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |