From patchwork Tue Apr 3 00:57:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 894422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-91353-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ojOAfdjS"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40FW074C7bz9s2B for ; Tue, 3 Apr 2018 10:57:27 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=l0mwl22ieYxLMDYETM8TPj5AxZTjq8HsWV2PFPMQir2s+N8KtymaD 7fdvGjuRr4Ud+IkKEmU+ZzXurgDDlA4oRz7LwERd+/9ORT6Rx35hD8fowdK7RSh6 dDK6CR8wzIR8gxGx8U7Oa7aVtumO8TPNfDvy169JG+PiDJ0wH8iWss= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=L9iwdVbVzN3iBug78Hz0vKnsx88=; b=ojOAfdjS/r2nYky53VqQNcdN6vvY RT9JQgNLEyqQb9wpKgBukoC8GFEZXtHG+lUSIL7DEUg2l0OvA5ixSj3zqZ1uOa1l y7trKPnlp96Wx3RZ5QTBDGeDQDOiMEC7SDDqlvCg7RTCaDcfdNlZvZVWtzxUuoLk zCIf3r6mxE4Sl8s= Received: (qmail 50490 invoked by alias); 3 Apr 2018 00:57:21 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 50479 invoked by uid 89); 3 Apr 2018 00:57:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy= X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited] hurd: Avoid local PLT in libpthread Date: Tue, 3 Apr 2018 02:57:15 +0200 Message-Id: <20180403005715.22031-1-samuel.thibault@ens-lyon.org> * htl/pt-exit.c: Include . (__pthread_exit): Call ___pthread_get_cleanup_stack instead of __pthread_get_cleanup_stack. --- ChangeLog | 6 ++++-- htl/pt-exit.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b54ed73b5..8f4aa359ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -249,8 +249,10 @@ (pthread_detach): New strong alias. (__pthread_detach): Call __pthread_cond_broadcast instead of pthread_cond_broadcast. - * htl/pt-exit.c (__pthread_exit): Call __pthread_setcancelstate - instead of pthread_setcancelstate. + * htl/pt-exit.c: Include . + (__pthread_exit): Call __pthread_setcancelstate and + ___pthread_get_cleanup_stack instead of pthread_setcancelstate and + __pthread_get_cleanup_stack. * htl/pt-testcancel.c: Include . (pthread_testcancel): Call __pthread_exit instead of pthread_exit. * sysdeps/htl/pt-attr-getstack.c: Include diff --git a/htl/pt-exit.c b/htl/pt-exit.c index 0815dbcd98..cb62f474fa 100644 --- a/htl/pt-exit.c +++ b/htl/pt-exit.c @@ -22,6 +22,7 @@ #include #include +#include #include @@ -40,7 +41,7 @@ __pthread_exit (void *status) disabled. */ __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); - for (handlers = __pthread_get_cleanup_stack (); + for (handlers = ___pthread_get_cleanup_stack (); *handlers != NULL; *handlers = (*handlers)->__next) (*handlers)->__handler ((*handlers)->__arg);