This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv2][BZ #13613] Allow a single-threaded process to cancel itself


On Thu, May 10, 2012 at 4:02 PM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> Hi,
>
> Here's an updated patch to allow a single-threaded process to cancel
> itself. The code change is essentially the same, except that I have
> added comments in a number of places as per Carlos' suggestion to
> explain what multiple_threads is all about. I have also added test cases
> for pthread_testcancel, pthread_setcanceltype and
> pthread_setcancelstate in addition to the earlier test case. Patch
> attached.
>
> Regards,
> Siddhesh
>
>
> nptl/ChangeLog:
>
> 2012-05-11 ?Siddhesh Poyarekar ?<siddhesh@redhat.com>
> ? ? ? ? ? ?Jakub Jelinek <jakub@redhat.com>
>
> ? ? ? ?[BZ #13613]
> ? ? ? ?* Makefile (tests): Add test cases.
> ? ? ? ?* descr.h (struct pthread): Add a comment describing
> ? ? ? ?multiple_threads.
> ? ? ? ?* pthreadP.h (__pthread_multiple_threads): Expand comment to
> ? ? ? ?include single-process case.
> ? ? ? ?* pthread_cancel.c (pthread_cancel): Enable multiple_threads
> ? ? ? ?before setting cancelstate of the thread.
> ? ? ? ?* sysdeps/unix/sysv/linux/libc_multiple_threads.c
> ? ? ? ?(__libc_multiple_threads): Add explanatory comment.
> ? ? ? ?* tst-cancel-self-cancelstate.c: New test case.
> ? ? ? ?* tst-cancel-self-canceltype.c: Likewise.
> ? ? ? ?* tst-cancel-self-cleanup.c: Supporting file for test cases.
> ? ? ? ?* tst-cancel-self-testcancel.c: New test case.
> ? ? ? ?* tst-cancel-self.c: Likewise.
> ? ? ? ?* vars.c: Expand comment to include single-process case.

This looks good to me.

I assume you tested on x86_64 and had no regressions?

If that's the case then please check this in on Monday if nobody else objects.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]