[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hurd_condition_wait in glibc libpthreads in Debian

From: Richard Braun
Subject: Re: Hurd_condition_wait in glibc libpthreads in Debian
Date: Wed, 1 Aug 2012 18:28:42 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Aug 01, 2012 at 08:44:20AM -0700, Thomas DiModica wrote:
> Most of what I understand is from what Marcus has to say in this thread here:
> http://lists.gnu.org/archive/html/hurd-devel/2002-07/msg00010.html

That link explains the problem very well. It's better to keep the
current calls to hurd_condition_wait (i.e. through plain error handling)
than try to replace that with complicated cleanup callbacks.

> My understanding is that hurd_condition_wait is used with hurd_thread_cancel
> in libc, as libc uses a different cancellation semantics than is provided by
> POSIX in pthreads.

No, the semantics are the same. The internal implementation may slightly
differ, I haven't looked in detail. The point is how to handle
cancellation from a cancelled thread, not how to mark a thread as being
cancelled. The hurd_thread_cancel function merely exists because there
isn't any in the cthreads package. You should be able to replace it with
pthread_cancel without further effort.

Richard Braun

reply via email to

[Prev in Thread] Current Thread [Next in Thread]