doc/wg/core/notes/core-notes-2024-03-08.md
static mut in a way that is both sound and zero-cost in
the current Tock case. Incidentally it would allow support for multi-core in
principle with some cost, including potentially being suitable for host
environments (as Alyssa suggested). It's along the lines of what Alyssa has
sketched, looks like thread_local! with a different implementation. There's
probably a diff that I could pull up but we'll probably have a PR in the next
few days.&mut reference, so we
have to modify types to take a Deref<Target = &mut ...> type instead.thread_local! you get a closure where you operate on a
non-'static version. Could maybe do a guard type.RefMut from a
thread_local that unsafely escapes the thread_local. It returns a wrapper type
that is zero-cost on chip but on host it is a Cell<RefMut<>>. The RefCell
remains locked, but because it is not Send or Sync, you can't have
unsoundness due to sharing it across threads. I think it would be more
ergonomic, as nested closures get sucky.(0..10, 10..20, 20..30) misses 10, 20,
and 30.test folders are for things like unit tests, and more
integration-y tests go elsewhere.