libc icon indicating copy to clipboard operation
libc copied to clipboard

Add ucontext_t for freebsd-aarch64

Open nathaniel-bennett opened this issue 1 year ago • 3 comments

Resolves #3217

nathaniel-bennett avatar Aug 17 '24 18:08 nathaniel-bennett

r? @JohnTitor

rustbot has assigned @JohnTitor. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Aug 17 '24 18:08 rustbot

The ucontext changes look good, but could you link whatever you are referencing for mcontext_t? https://github.com/freebsd/freebsd-src/blob/1a207e5cdf997bd5a04e020d26039844a0c1294f/sys/arm64/include/ucontext.h#L54-L61 (linked from https://github.com/rust-lang/libc/issues/3217) has a different definition.

tgross35 avatar Sep 01 '24 07:09 tgross35

The definition you link is included in the aarch64.rs submodule, which is intended for 64-bit ARM. The one I added is in the arm.rs submodule for 32-bit ARM architectures; its corresponding documentation can be found here:

https://github.com/freebsd/freebsd-src/blob/2b7f2890a812eb09dccaa8069483566a3b292338/sys/arm/include/ucontext.h#L74-L84

Likewise, documentation for PowerPC can be found here:

https://github.com/freebsd/freebsd-src/blob/2b7f2890a812eb09dccaa8069483566a3b292338/sys/powerpc/include/ucontext.h#L39-L51

nathaniel-bennett avatar Sep 06 '24 20:09 nathaniel-bennett

@asomers could I get an ack from you before I backport this?

tgross35 avatar Oct 15 '24 05:10 tgross35

nack @tgross35 there's an error for armv7. I'll open a PR to fix it.

asomers avatar Oct 21 '24 20:10 asomers