check if :sb-thread is in your *features*.
Line #305 of src/cold/shared will add the :os-thread-stack feature for OpenBSD and then you'll get a definition for new_thread_trampoline_switch_stack in thread.c
As to register usage, according to riscv-linux-os.c, they are all sequential in the sigcontext for linux, so it can use "return (os_context_register_t*)&(context->uc_mcontext.__gregs[offset]);" for the definition of os_context_register_addr. Perhaps it works similarly easily on OpenBSD
check if :sb-thread is in your *features*. trampoline_ switch_ stack in thread.c
Line #305 of src/cold/shared will add the :os-thread-stack feature for OpenBSD and then you'll get a definition for new_thread_
As to register usage, according to riscv-linux-os.c, they are all sequential in the sigcontext for linux, so it can use "return (os_context_ register_ t*)&(context- >uc_mcontext. __gregs[ offset] );" for the definition of os_context_ register_ addr. Perhaps it works similarly easily on OpenBSD