Skip to content

Change Logger to use an atomic pointer internally - #978

Merged
phip1611 merged 2 commits into
rust-osdev:mainfrom
nicholasbishop:bishop-atomic-logger
Oct 27, 2023
Merged

phip1611 merged 2 commits into
rust-osdev:mainfrom
nicholasbishop:bishop-atomic-logger

Conversation

@nicholasbishop

Copy link
Copy Markdown
Member

Using a Logger no longer requires making it mutable, and it now provides a const new function. This allows creating a static Logger, rather than a static mut Option<Logger>, which allows for less unsafe.

Update the LOGGER in uefi-services accordingly.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

Using a `Logger` no longer requires making it mutable, and it now provides a
`const` `new` function. This allows creating a `static` `Logger`, rather than a
`static mut` `Option<Logger>`, which allows for less `unsafe`.
@phip1611
phip1611 added this pull request to the merge queue Oct 27, 2023
Merged via the queue into rust-osdev:main with commit 6e3b06c Oct 27, 2023
@nicholasbishop
nicholasbishop deleted the bishop-atomic-logger branch October 27, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants