On Thu, Sep 2, 2021 at 6:55 PM <i...@bsdimp.com> wrote: > > From: Warner Losh <i...@freebsd.org> > > Update target_arch_elf.h to remove thread_init. Move its contents to > target_arch_thread.h and rename to target_thread_init(). Update > elfload.c to call it. Create thread_os_thread.h to hold the os specific > parts of the thread and threat manipulation routines. Currently, it just
s/threat/thread/ > includes target_arch_thread.h. target_arch_thread.h contains the at the > moment unused target_thread_set_upcall which will be used in the future > when creating actual thread (i386 has this stubbed, but other > architectures in the bsd-user tree have real ones). FreeBSD doesn't do > AT_HWCAP, so remove that code. Linux does, and this code came from there. > > These changes are all interrelated and could be brokend own, but seem to s/brokend own/broken down/ > represent a reviewable changeset since most of the change is boiler > plate. > > Signed-off-by: Stacey Son <s...@freebsd.org> > Signed-off-by: Warner Losh <i...@bsdimp.com> > --- > bsd-user/elfload.c | 4 ++- > bsd-user/freebsd/target_os_thread.h | 25 +++++++++++++ > bsd-user/i386/target_arch_elf.h | 52 ++-------------------------- > bsd-user/i386/target_arch_thread.h | 47 +++++++++++++++++++++++++ > bsd-user/netbsd/target_os_thread.h | 25 +++++++++++++ > bsd-user/openbsd/target_os_thread.h | 25 +++++++++++++ > bsd-user/x86_64/target_arch_elf.h | 38 ++------------------ > bsd-user/x86_64/target_arch_thread.h | 40 +++++++++++++++++++++ > 8 files changed, 171 insertions(+), 85 deletions(-) > create mode 100644 bsd-user/freebsd/target_os_thread.h > create mode 100644 bsd-user/i386/target_arch_thread.h > create mode 100644 bsd-user/netbsd/target_os_thread.h > create mode 100644 bsd-user/openbsd/target_os_thread.h > create mode 100644 bsd-user/x86_64/target_arch_thread.h > Minor message nits, but otherwise: Reviewed-by: Kyle Evans <kev...@freebsd.org>