From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manolis Ragkousis Subject: Re: [PATCH] gnu: base: Add Glibc-Hurd Headers. Date: Sat, 27 Sep 2014 16:50:02 +0300 Message-ID: References: <8761hbcspb.fsf@gnu.org> <87y4t5if3q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXsVu-0002E4-Ru for Guix-devel@gnu.org; Sat, 27 Sep 2014 09:58:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXsVt-0001GF-Nw for Guix-devel@gnu.org; Sat, 27 Sep 2014 09:58:18 -0400 In-Reply-To: <87y4t5if3q.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: Guix-devel >> And thread_terminate does exist, that's why it's enough for our needs. > > You mean =E2=80=98thread_terminate_release=E2=80=99? Okay, let me explain it a bit better Here is the part we are interested in "libpthread/sysdeps/mach/pt-thread-terminate.c" /* Terminate and release all that's left. */ err =3D __thread_terminate_release (kernel_thread, mach_task_self (), kernel_thread, reply_port, stackaddr, stacksize); /* The kernel does not support it yet. Leak but at least terminate correctly. */ err =3D __thread_terminate (kernel_thread); The comment "The kernel does not support it yet." is misleading. It wants to say that __thread_terminate_release is not yet supported so __thread_terminate can be used instead, to at least terminate it correctly, even though we will have leaks. That's why Samuel told me here http://lists.gnu.org/archive/html/bug-hurd/2014-05/msg00127.html > Manolis Ragkousis, le Thu 15 May 2014 21:08:41 +0000, a =C3=A9crit : > > So I commented the part that calls this function out and glibc gets > > built succefully with libpthread. > > > err =3D __thread_terminate_release (kernel_thread, mach_task_self (= ), > > That should be fine, yes, IIRC I left a thread_terminate call just > below, which should work enough for your needs. Manolis