This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: problem in pthread_key_create


Hi Corinna,

Thanks for the info. You are right, an EBUSY is returned when a valid key is
passed. I wrote first the report about EBUSY, then after that of the ! Part.

But, why EBUSY and not EINVAL? I have not figured out why a regression test
in ACE (see www.cs.wustl.edu/~schmidt) calls this twice. We now get the
error in our logfile:
ACE_Thread::keycreate: Device or resource busy (no more keys)

I would have expected:
ACE_Thread::keycreate: Invalid value.

I find the error text so strange.

Johnny

****

On Jan 10 13:00, Corinna Vinschen wrote:
> On Jan  9 18:31, Johnny Willemsen wrote:
> > A question, I had a look at the implementation of pthread_key_create.
When
> > an invalid key is passed, a EBUSY is returned.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I just read this again and it occured to me that this is a misconception.
pthread_key_create() returns EBUSY if a *valid* key is passed.  This
should make it clearer, shouldn't it?


Corinna

> 
> No, that's not a bug.  Please read the SUSv3 description for
> pthread_key_create() here:
> 
>
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_key_create.h
tml
> 
> Please note especially the chapter
> 
>   RATIONALE/Non-Idempotent Data Key Creation.
> [...]

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]