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 |
Subject: | wrong pthread_mutexattr_init value bug? |
MIME-Version: | 1.0 |
Date: | Tue, 14 Oct 2003 15:55:01 +0200 |
X-MimeOLE: | Produced By Microsoft Exchange V6.0.6249.0 |
Message-ID: | <A3D1526C98B7C1409A687E0943EAC410015775@obelix.askesis.nl> |
X-MS-Has-Attach: | yes |
X-MS-TNEF-Correlator: | |
From: | "Joost Kraaijeveld" <J DOT Kraaijeveld AT Askesis DOT nl> |
To: | "Cygwin (E-mail)" <cygwin AT cygwin DOT com> |
------=_NextPart_000_008D_01C3926B.86A2D480 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit According to the Cygwin sources the function pthread_mutexattr_init (see below) can return EBUSY. As far as I can see in several docs, this is not a valid return value. According to the IEEE Std 1003.1 online docs only ENOMEM or 0 are valid return values. Besides this, why should this function return a different value after the first test for "pthread_mutexattr::is_good_object (attr)", EBUSY than after the second test (0)? Is this a bug? Except from the code in winsup/cygwin/thread.cc ..... /* FIXME: write and test process shared mutex's. */ extern "C" int pthread_mutexattr_init (pthread_mutexattr_t *attr) { if (pthread_mutexattr::is_good_object (attr)) return EBUSY; *attr = new pthread_mutexattr (); if (!pthread_mutexattr::is_good_object (attr)) { delete (*attr); *attr = NULL; return ENOMEM; } return 0; } ... Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 email: J DOT Kraaijeveld AT Askesis DOT nl web: www.askesis.nl ------=_NextPart_000_008D_01C3926B.86A2D480 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIFyjCCAoow ggHzoAMCAQICAwmcrjANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdl c3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMQ8wDQYDVQQKEwZUaGF3dGUxHTAbBgNVBAsT FENlcnRpZmljYXRlIFNlcnZpY2VzMSgwJgYDVQQDEx9QZXJzb25hbCBGcmVlbWFpbCBSU0EgMjAw MC44LjMwMB4XDTAzMDMyOTA3NTMxMVoXDTA0MDMyODA3NTMxMVowSjEfMB0GA1UEAxMWVGhhd3Rl IEZyZWVtYWlsIE1lbWJlcjEnMCUGCSqGSIb3DQEJARYYSi5LcmFhaWpldmVsZEBBc2tlc2lzLm5s MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCsebR/TNuW28XXwA1E3XHnT9EFbcLmZl2uFaoT APeRWEIo/hXei3RA+jgzrsW61aEfcKj9eefxWhrcfREz8F52gFSQZvxVb6Ty0DEiCPjxTHXrq4nY /uKqflorlZ7ZIv6DBbcAF/tPRisdc8Ah7BEIjqNXoJkUuQtKkz+azzh7nQIDAQABozUwMzAjBgNV HREEHDAagRhKLktyYWFpamV2ZWxkQEFza2VzaXMubmwwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0B AQQFAAOBgQCtpEwsyJ+hpnaHuY1yXeGb77VUhtsHw/RVhuUUqUz45asm9c38HM15PO770kWGlVNI bjoMU/S52haE8WpbMU7Z1fd33EB8+tpEYUf7FdHE2cLiVO4/qZOIcPuwitE3rCYrNr+WdBcQsCAi MmTyYRo0D9G3rrAKY+H+PvZbSr4pMTCCAzgwggKhoAMCAQICEGZF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6ln+eE2MliYq0FxjGCAqow ggKmAgEBMIGaMIGSMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQH EwlDYXBlIFRvd24xDzANBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUQ2VydGlmaWNhdGUgU2Vydmlj ZXMxKDAmBgNVBAMTH1BlcnNvbmFsIEZyZWVtYWlsIFJTQSAyMDAwLjguMzACAwmcrjAJBgUrDgMC GgUAoIIBZTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wMzEwMTQx MzU1MDFaMCMGCSqGSIb3DQEJBDEWBBSgZ0W7pRx7kPeyV8HnIwrU40UCRTBYBgkqhkiG9w0BCQ8x SzBJMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIAgDAHBgUrDgMCBzANBggqhkiG9w0DAgIBKDAH BgUrDgMCGjAKBggqhkiG9w0CBTCBqwYJKwYBBAGCNxAEMYGdMIGaMIGSMQswCQYDVQQGEwJaQTEV MBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xDzANBgNVBAoTBlRoYXd0 ZTEdMBsGA1UECxMUQ2VydGlmaWNhdGUgU2VydmljZXMxKDAmBgNVBAMTH1BlcnNvbmFsIEZyZWVt YWlsIFJTQSAyMDAwLjguMzACAwmcrjANBgkqhkiG9w0BAQEFAASBgJ+7ZIZb/h+Je6hhG+A8UXX3 gABrug9MsZuVeOiFqqgRay6deQbR2tG6uFx+tgEfXwfW2baUIFTlgB51/BUvePHD6+c8zwRLQEMS ZLfwwYvV0esgR9s8t4GB/mNrD6vaJH6ab7kg8PBg84AlWq9MGH62YB4WYYHMkLS6gNERHVWZAAAA AAAA ------=_NextPart_000_008D_01C3926B.86A2D480--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |