RE: a question about tst-cancel2
"Hu, Boris" <[email protected]>
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <37FBBA5F3A361C41AB7CE44558C3448E1A176F@pdsmsx403.ccr.corp.intel.com> |
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. :( any pointers? thanks. boris > -----Original Message----- > From: Saurabh Desai [mailto:[email protected]] > Sent: 2003?4?1? 2:27 > To: [email protected] > Subject: Re: a question about tst-cancel2 > > > "Hu, Boris" wrote: > > > > when a pthread is created, th->cancelhandling=0; > > then pthread_cancel(th) will only mark > > th->cancelhandling=4(CANCELED_BITMASK) without > > calling __pthread_kill(). > > Where could I find the place to execute the cancel buf > > of th pthread? th pthread calls sys_exit() directly > > after return according to clone.S > > > If it's not an asynchronous cancellation, the pthread_testcancel() > calls __do_cancel(), which then longjmp back for an exit. > Is this what you are looking for? > > - Saurabh > > > > -- > Phil-list mailing list > [email protected] > https://listman.redhat.com/mailman/listinfo/phil-list >