Re: a question about tst-cancel2

Saurabh Desai <[email protected]>
Newsgroups gmane.comp.lib.phil
Message-ID <[email protected]>
"Hu, Boris" wrote:
> 
> thanks for your reply.  :)
> 
> yeah, pthread_testcancel() is a point to execute cancel buffer
> code. But in tst-cancel2, there is no place to call
> pthread_testcancel().  :(  So there must be another place
> to call __do_cancel().
> 
> I have checked all places to call __do_cancel(),
> init.c::sigcancel_handler()
> _pthread_cleanup_pop_restore()
> pthread_testcancel()
> pthread_enable_asynccancel()
> pthread_enable_asynccancel_2()
> __libc_enable_asynccancel()
> pthread_exit()
> pthread_setcancelstate()
> pthread_setcanceltype()
> 
> but I failed to find the tst-cancel2 to run one of them. :(
> 
In this case, it will run from sigcancel_handler(). Here the write()
is a cancellation point and enables async-cancellation before it waits
in kernel. The pthread_cancel sends SIGCANCEL signal and this
handler gets called, which then calls __do_cancel.

- Saurabh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.