On Thu, 20 Sep 2018, Mathieu Desnoyers wrote:
Something like this in pthreadP.h ?
+#ifdef __NR_rseq
+#include <sysdeps/unix/sysv/linux/rseq-internal.h>
+#else
+#include <sysdeps/nptl/rseq-internal.h>
+#endif /* __NR_rseq. */
where sysdeps/unix/sysv/linux/rseq-internal.h contains the linux
implementation of rseq_register_current_thread () and
rseq_unregister_current_thread (), and sysdeps/nptl/rseq-internal.h
contains stubs.
Am I on the right track ?
It's hard to define the right abstractions for what goes where given that
only Linux uses NPTL since the removal of the NaCl port. I suppose it
does make logical sense for a #include of <linux/rseq.h> to go somewhere
under sysdeps/unix/sysv/linux/.
--
Joseph S. Myers
joseph@codesourcery.com