Never mind (was: POSIX key destruction)

Phil Torre ptorre at zetron.com
Wed Dec 11 18:31:24 UTC 2002


On Wed, Dec 11, 2002 at 08:13:04AM -0600, Joel Sherrill wrote:
> 
> 
> Phil Torre wrote:
> > 
> > After digging around in the POSIX key code, I think I now understand
> > that the key destructor function is supposed to set the value to NULL,
> > not RTEMS (which is why RTEMS doesn't do it :).  Thus, my previous
> > question was dumb, and the problem is in the ACE-supplied destructor.
> > 
> > (I'll go pester the ACE list and just announce here when everything
> > actually works.)
> 
> They should fix their destructor but I think RTEMS should not have
> taken the infinite loop behavior choice.

I probably wasn't clear before; RTEMS does actually honor 
PTHREAD_DESTRUCTOR_ITERATIONS (with a defined value of 4, btw).  My
code was bombing because a block was free'd twice (since the ACE
destructor function doesn't set the key value to NULL before it
returns).  I now see that RTEMS is doing the Right Thing.


-- 

=====================================================================
Phil Torre                               phone: 425-820-6363 x234
Design Engineer                          email: ptorre at zetron.com
Switching Systems Group                    fax: 425-820-7031
Zetron, Inc.                               web: http://www.zetron.com


  




More information about the users mailing list