lost patch to cleanup/cancel code?
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Dec 12 01:05:42 UTC 2002
Vladimir Nesic wrote:
>
> > At least a week ago someone posted or email me a one line
> > patch to what I remember being the POSIX cancel or cleanup
> > routines. But I can't find it anymore. Could someone please
> > repost it so I can review and commit it?
> >
> > THanks.
>
> This is the patch. I am not sure that it is 100% safe, but my aplication
> stopped crashing after the change.
GOod reason. This patch is correct. _Chain_Tail returns the permanent
null node at the beginning and end of every chain. You need to go
forward
from the permanent head or back from the permanent tail. Makes me
remember
long ago wanting to add Chain_First_node and Chain_Last_node.
This is committed.
Thanks.
--joel
> ------------ Original message: -----------------
>
> I have found an error preventing pthread_cleanup_pop() and
> _POSIX_Thread_cancel_run() from running correctly.
>
> In both functions I have changed line:
>
> handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack );
>
> to:
>
> handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack
> )->previous;
>
> and now everything seams to work OK.
>
> Vlada
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list