1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

nptl: Add public rseq symbols and <sys/rseq.h>

The relationship between the thread pointer and the rseq area
is made explicit.  The constant offset can be used by JIT compilers
to optimize rseq access (e.g., for really fast sched_getcpu).

Extensibility is provided through __rseq_size and __rseq_flags.
(In the future, the kernel could request a different rseq size
via the auxiliary vector.)

Co-Authored-By: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
This commit is contained in:
Florian Weimer
2021-12-09 09:49:32 +01:00
parent e3e589829d
commit c901c3e764
38 changed files with 237 additions and 5 deletions

View File

@ -171,4 +171,14 @@ struct rseq
#endif /* __GLIBC_HAVE_KERNEL_RSEQ */
/* Offset from the thread pointer to the rseq area. */
extern const int __rseq_offset;
/* Size of the registered rseq area. 0 if the registration was
unsuccessful. */
extern const unsigned int __rseq_size;
/* Flags used during rseq registration. */
extern const unsigned int __rseq_flags;
#endif /* sys/rseq.h */