From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2944 invoked by alias); 16 Jun 2003 10:39:00 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 2874 invoked from network); 16 Jun 2003 10:38:59 -0000 Received: from unknown (HELO localhost.localdomain) (195.113.19.66) by sources.redhat.com with SMTP; 16 Jun 2003 10:38:59 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h5GAcvqO025932; Mon, 16 Jun 2003 12:38:57 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id h5GAcuVk025920; Mon, 16 Jun 2003 12:38:56 +0200 Date: Mon, 16 Jun 2003 10:39:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: clock_nanosleep cancellation problem Message-ID: <20030616103856.GD20507@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-06/txt/msg00030.txt.bz2 Hi! The following change: * sysdeps/unix/clock_nanosleep.c: Add cancellation support. * sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise. breaks x86_64 and supposedly all arches which use library local variable instead of a field in struct pthread for multiple_threads. ../sysdeps/unix/clock_nanosleep.c:97: undefined reference to `__libc_multiple_threads' make[2]: *** [/usr/src/build/269611-x86_64/BUILD/glibc-2.3.2-200306160509/build-x86_64-linuxnptl/rt/librt.so] Error 1 Possible fix could be a) add multiple_threads struct pthread field unconditionally and set it (on thread creation) in addition to __libc_multiple_threads and __pthread_multiple_threads, in sysdep-cancel.h use __libc_multiple_threads in libc.so, __pthread_multiple_threads in libpthread.so and THREAD_SELF->multiple_threads in other libraries b) add __librt_multiple_threads and some hooks to initialize it Also, linuxthreads needs the same changes as NPTL, otherwise linuxthreads doesn't compile at all. I can write a patch for linuxthreads, but would like to know which way to go in NPTL/x86_64 etc. first, as linuxthreads will do the same. Jakub