From patchwork Wed Oct 23 21:35:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Jeanson X-Patchwork-Id: 99458 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE1963858D28 for ; Wed, 23 Oct 2024 21:36:32 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtpout.efficios.com (smtpout.efficios.com [IPv6:2607:5300:203:b2ee::31e5]) by sourceware.org (Postfix) with ESMTPS id 087C13858D21 for ; Wed, 23 Oct 2024 21:36:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 087C13858D21 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 087C13858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:5300:203:b2ee::31e5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729719372; cv=none; b=klX82X/2PL/WvuFOFW56vm+K8o7P5IBdk0+B7ISGHrpEiosxu0luUSRCbQ6YpbJlYnGLyKnFKQ3HXat7mcMFyZgAJRT17L+eYc7Ad2Ix1qLTSh4PIYtHBnGCN3Q0tEZ8IXePlyRmzv5bfCv5D3DbwhKW7n8oLM+Qu1Pp11pdeqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729719372; c=relaxed/simple; bh=ILjXlsAUJDmA4UM/QK+gzwQte2EqVH0Pa62wHWFSAkk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TfpMOJyqH/1mlQzv5fYOxUPeAWhQe+DKBi14AeY93pKK46biHrNnlCVfeBwV9ePzngx0xwXN9mvxlSJhjGE7D65El2o5T6x/15twiO9cfS2WCWWFA1PJi/s2iSrUPIcGArlIkTML8G70eY1YMFJr47ryqCNxtVRseoHQszOFruo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1729719369; bh=ILjXlsAUJDmA4UM/QK+gzwQte2EqVH0Pa62wHWFSAkk=; h=From:To:Cc:Subject:Date:From; b=Arypf56qzeZyq/5Pmw1rBTyY8mNHjGE+y3xO21XvFBKFgq5XEqzmH0WAqFAxx3BAA TStJnmetXInKqOsWeoW3G0Cgz9Iu66I6Ln8p16m1RXniHJ31PBJUckpdJDpnd3E7ug Tin6217vigbjn32YSYuUAFkUWPFUbvP5I5uKlNXxht4jXSqBdnuy4WPEXwrLvXk4f/ eeIkXWSo4zdzCf3+T/RwvPfNg629Cmxch1BOkwJWMoBhR3DKfN0wfDTLaatYkW9Ams wqu4WV5CJxXu1TMv58Nr9ikWxss2NcZe0dZlbpMAq1ohc3WLa70szfeIui0bRioHcy TcVh3NSnECL6A== Received: from laptop-mjeanson.internal.efficios.com (96-127-217-162.qc.cable.ebox.net [96.127.217.162]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4XYj613mYlzjlF; Wed, 23 Oct 2024 17:36:09 -0400 (EDT) From: Michael Jeanson To: libc-alpha@sourceware.org Cc: Michael Jeanson , Florian Weimer , Andreas Schwab , =?utf-8?q?Andreas_K_=2E_H=C3=BCttel?= Subject: [PATCH] nptl: Add for m68k Date: Wed, 23 Oct 2024 17:35:07 -0400 Message-ID: <20241023213529.578720-1-mjeanson@efficios.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org This will be required by the rseq extensible ABI implementation on all Linux architectures exposing the '__rseq_size' and '__rseq_offset' symbols to set the initial value of the 'cpu_id' field which can be used by applications to test if rseq is available and registered. As long as the symbols are exposed it is valid for an application to perform this test even if rseq is not yet implemented in libc for this architecture. Compile tested with build-many-glibcs.py but I don't have access to any hardware to run the tests. Signed-off-by: Michael Jeanson --- Cc: Florian Weimer Cc: Andreas Schwab Cc: Andreas K. Hüttel --- sysdeps/m68k/nptl/thread_pointer.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/m68k/nptl/thread_pointer.h diff --git a/sysdeps/m68k/nptl/thread_pointer.h b/sysdeps/m68k/nptl/thread_pointer.h new file mode 100644 index 0000000000..08df6a8ac4 --- /dev/null +++ b/sysdeps/m68k/nptl/thread_pointer.h @@ -0,0 +1,30 @@ +/* __thread_pointer definition. m68k version. + Copyright (C) 2021-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SYS_THREAD_POINTER_H +#define _SYS_THREAD_POINTER_H + +extern void * __m68k_read_tp (void); + +static inline void * +__thread_pointer (void) +{ + return __m68k_read_tp (); +} + +#endif /* _SYS_THREAD_POINTER_H */