public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Michael Jeanson <mjeanson@efficios.com>
To: libc-alpha@sourceware.org
Cc: Michael Jeanson <mjeanson@efficios.com>,
	Florian Weimer <fweimer@redhat.com>,
	Carlos O'Donell <carlos@redhat.com>, DJ Delorie <dj@redhat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: [PATCH v12 12/17] nptl: Add <thread_pointer.h> for csky
Date: Mon,  5 Aug 2024 16:48:34 -0400	[thread overview]
Message-ID: <20240801-rseq-abi-v11-split-v12-12-0e87479dddc0@efficios.com> (raw)
In-Reply-To: <20240801-rseq-abi-v11-split-v12-0-0e87479dddc0@efficios.com>

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 'cpu_id' field so applications can test if rseq is
registered.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
---
 sysdeps/csky/nptl/thread_pointer.h | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/sysdeps/csky/nptl/thread_pointer.h b/sysdeps/csky/nptl/thread_pointer.h
new file mode 100644
index 0000000000..d4847f691a
--- /dev/null
+++ b/sysdeps/csky/nptl/thread_pointer.h
@@ -0,0 +1,30 @@
+/* __thread_pointer definition.  csky 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
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_THREAD_POINTER_H
+#define _SYS_THREAD_POINTER_H
+
+register void *__thread_register asm ("r31");
+
+static inline void *
+__thread_pointer (void)
+{
+  return __thread_register;
+}
+
+#endif /* _SYS_THREAD_POINTER_H */

-- 
2.39.2

  parent reply	other threads:[~2024-08-05 20:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 20:48 [PATCH v12 00/17] Add rseq extensible ABI support Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 01/17] nptl: Add rseq auxvals Michael Jeanson
2024-08-06  6:11   ` Florian Weimer
2024-08-06 13:32     ` Michael Jeanson
2024-08-07 15:25       ` Michael Jeanson
2024-08-07 17:52         ` Florian Weimer
2024-08-07 19:07           ` Michael Jeanson
2024-08-15 17:54         ` Florian Weimer
2024-08-15 18:38           ` Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 02/17] Add generic 'extra TLS' Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 03/17] Add Linux " Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 04/17] nptl: Add <thread_pointer.h> for RISC-V Michael Jeanson
2024-08-06  6:06   ` Florian Weimer
2024-08-05 20:48 ` [PATCH v12 05/17] nptl: Add <thread_pointer.h> for LoongArch Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 06/17] nptl: Add <thread_pointer.h> for sparc Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 07/17] nptl: Add <thread_pointer.h> for m68k Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 08/17] nptl: Add <thread_pointer.h> for or1k Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 09/17] nptl: Add <thread_pointer.h> for nios2 Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 10/17] nptl: Add <thread_pointer.h> for microblaze Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 11/17] nptl: Add <thread_pointer.h> for hppa Michael Jeanson
2024-08-05 20:48 ` Michael Jeanson [this message]
2024-08-05 20:48 ` [PATCH v12 13/17] nptl: add RSEQ_SIG for RISC-V Michael Jeanson
2024-08-06  6:05   ` Florian Weimer
2024-08-05 20:48 ` [PATCH v12 14/17] nptl: Introduce RSEQ_GETMEM_VOLATILE and RSEQ_SETMEM Michael Jeanson
2024-09-14 11:19   ` Florian Weimer
2024-10-10 20:24     ` Michael Jeanson
2024-10-14  6:34       ` Florian Weimer
2024-08-05 20:48 ` [PATCH v12 15/17] nptl: Move the rseq area to the 'extra TLS' block Michael Jeanson
2024-09-14 11:51   ` Florian Weimer
2024-10-11 18:01     ` Michael Jeanson
2024-10-14  6:32       ` Florian Weimer
2024-10-15 18:40         ` Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 16/17] nptl: Remove the rseq area from 'struct pthread' Michael Jeanson
2024-08-05 20:48 ` [PATCH v12 17/17] Linux: Update internal copy of '<sys/rseq.h>' Michael Jeanson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240801-rseq-abi-v11-split-v12-12-0e87479dddc0@efficios.com \
    --to=mjeanson@efficios.com \
    --cc=carlos@redhat.com \
    --cc=dj@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).