Skip to content

[libunwind] Feature Request: Improved baremetal support for libunwind.  #95189

Open
@BlamKiwi

Description

@BlamKiwi

For bare-metal SMP targets like <ARCH>-none-elf, it can be useful to enable libunwind even if exceptions aren't being used. This usually happens if the ABI being targeted doesn't support stacktracing with just the stack frame.

Currently libunwind RWMutex assumes a standard threading library is present or threading is entirely disabled. This adds extra steps in getting libunwind functioning on unconventional SMP systems.

It would be nice if there was a build option to use a spin-lock based solution. It obviously has some performance overheads compared to a true threading library, but given that bare metal embedded shouldn't really be using exceptions this is probably not a problem.

If there's interest in this kind of solution, I can provide a spin-lock based RWLock implementation along with a Relacy model for verification. I don't know what other testing the maintainers would want to see before merging in such a change though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions