delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/10/14:21:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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: Mon, 10 Jan 2005 14:21:17 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: problem in pthread_key_create
In-Reply-To: <20050110191136.GI23702@cygbert.vinschen.de>
Message-ID: <Pine.GSO.4.61.0501101419100.24510@slinky.cs.nyu.edu>
References: <200501101836 DOT j0AIaG9m007168 AT thor DOT remedy DOT nl> <20050110191136 DOT GI23702 AT cygbert DOT vinschen DOT de>
MIME-Version: 1.0

On Mon, 10 Jan 2005, Corinna Vinschen wrote:

> On Jan 10 19:36, Johnny Willemsen wrote:
> > 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.
>
> I don't.  You're asking the function to recreate a key which is already
> in use.  "Already in use" roughly translates to EBUSY pretty well,
> doesn't it?  Also, since the standards don't define a specific error
> code in this situation, you can't expect one.

I think Johnny was referring to the "no more keys" part when he said that
the error text was strange.  That is indeed strange, but probably a bug in
the way the regression test interprets that specific error code.

> However, the important sentence in the SUSv3 description is:
>
>   It is the responsibility of the programmer to ensure that it is called
>   *exactly* once per key before use of the key.
>
> So it's arguably a bug in the above regression test.

If not in the way pthread_key_create is invoked, then in the
interpretation of the resulting error.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019