Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Make fields of ExceptionFrame private #234

@jonas-schievink

Description

@jonas-schievink

We might want ExceptionFrame to support accessing FPU registers in the future. Adding these would be a breaking change, since all of its fields are public.

When writing an RTOS, it may be useful to be able to modify the stacked registers, which is generally wildly unsafe, but could be still done correctly. To do this, a &mut ExceptionFrame needs to be passed to the handler. With the current API this is immediately unsound, since the code in the handler can set them without requiring unsafe.

Making the fields private and having safe getters and unsafe setters would allow this sort of API to be provided.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions