From patchwork Mon Jun 13 10:38:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 13027 Received: (qmail 9800 invoked by alias); 13 Jun 2016 10:48:36 -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 9352 invoked by uid 89); 13 Jun 2016 10:48:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com From: Gary Benson To: libc-alpha@sourceware.org Subject: [RFC v2][PATCH 13/27] Add Infinity THREAD_SELF macros to sysdeps/s390/nptl/tls.h Date: Mon, 13 Jun 2016 11:38:17 +0100 Message-Id: <1465814311-31470-14-git-send-email-gbenson@redhat.com> In-Reply-To: <1465814311-31470-1-git-send-email-gbenson@redhat.com> References: <1465814311-31470-1-git-send-email-gbenson@redhat.com> This commit adds Infinity THREAD_SELF macros for s390. --- sysdeps/s390/nptl/tls.h | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/s390/nptl/tls.h b/sysdeps/s390/nptl/tls.h index e4c3ec7..d27a01e 100644 --- a/sysdeps/s390/nptl/tls.h +++ b/sysdeps/s390/nptl/tls.h @@ -147,9 +147,15 @@ typedef struct /* Return the thread descriptor for the current thread. */ # define THREAD_SELF ((struct pthread *) __builtin_thread_pointer ()) +/* Magic for Infinity to know how to do THREAD_SELF. */ +# define I8_THREAD_SELF I8_TS_REGISTER +# define I8_TS_REG_OFFSET 18 * sizeof (void *) +# define I8_TS_REG_BIAS 0 + /* Magic for libthread_db to know how to do THREAD_SELF. */ -# define DB_THREAD_SELF REGISTER (32, 32, 18 * 4, 0) \ - REGISTER (64, __WORDSIZE, 18 * 8, 0) +# define DB_THREAD_SELF \ + REGISTER (32, 32, 18 * 4, I8_TS_REG_BIAS) \ + REGISTER (64, __WORDSIZE, 18 * 8, I8_TS_REG_BIAS) /* Access to data in the thread descriptor is easy. */ #define THREAD_GETMEM(descr, member) \