ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
ivche has quit [Read error: Connection reset by peer]
ivche has joined #rust-embedded
sroemer has joined #rust-embedded
i509vcb[m] has quit [Quit: Idle timeout reached: 172800s]
sroemer has quit [Quit: WeeChat 4.4.3]
sroemer has joined #rust-embedded
sroemer has quit [Quit: WeeChat 4.4.3]
pcs38 has joined #rust-embedded
kaoD has quit [Quit: Ping timeout (120 seconds)]
kaoD has joined #rust-embedded
richardeoin has quit [Quit: WeeChat 4.1.1]
richardeoin has joined #rust-embedded
thalesfragoso[m] has joined #rust-embedded
<thalesfragoso[m]> reitermarkus: For the heapless problem, I was thinking on a way to still keep UnionNode. I thought about one, but it isn't wait-free: the idea is to have a stub pointer on the `Stack` structure, and replace the head with it before reading the next node. That way, if a second thread tries to pop one too, it would see the stub and wait/try-again.
<thalesfragoso[m]> But that is awful for bare metal without real threads, it would be a live-lock.
<thalesfragoso[m]> Let me know if you have any ideas, because I close to giving up and just suggest to get rid of `UnionNode` and eat the 4/8 bytes per boxed object :/
<thalesfragoso[m]> * because I'm close
<thalesfragoso[m]> Context for other people that might have suggestions:
thejpster[m] has quit [Quit: Idle timeout reached: 172800s]
sroemer has joined #rust-embedded
pcs38 has quit [Remote host closed the connection]
reitermarkus[m] has joined #rust-embedded
<reitermarkus[m]> No, I also don't have a better idea at the moment. I think waiting isn't an option even with real threads since you will deadlock if the interleaved try_pop happens in an interrupt, right?
<thalesfragoso[m]> Probably, unless we return something else, like Error::Busy, which would make application logic more complex. I don't think it's a decent trade-off
<thalesfragoso[m]> I'm writing some tests with loom + miri now, to see if I can trigger the problem, which would be quite reassuring for future changes.
<JamesMunns[m]> 👀 is this a trieber stack for heapless pool?
sroemer has quit [Quit: WeeChat 4.4.3]
diondokter[m] has quit [Quit: Idle timeout reached: 172800s]
<thalesfragoso[m]> <JamesMunns[m]> "👀 is this a trieber stack for..." <- Yep
<thalesfragoso[m]> See the linked issue above.
<thalesfragoso[m]> Hmm, loom's UnsafeCell::new isn't const .-.
<thalesfragoso[m]> Let's see if more config flags can solve this...
<JamesMunns[m]> Yeah, you might need a cfg not loom on the const version
<JamesMunns[m]> you could look at maitake-sync or cordyceps' loom tests for how we handle that
<JamesMunns[m]> cordyceps has a module for switching between loom and not loom types: https://github.com/hawkw/mycelium/blob/main/cordyceps/src/loom.rs
<thalesfragoso[m]> Thanks, I found a ready-to-go macro-rules in maitake-sync
HumanG331 has quit [Ping timeout: 265 seconds]
pcs38 has joined #rust-embedded
<thalesfragoso[m]> Hmm, doesn't transmute work on const generic arrays?
<thalesfragoso[m]> Trying:
<thalesfragoso[m]> ```rust
<thalesfragoso[m]> Hmm, doesn't transmute work on const generic arrays?
<thalesfragoso[m]> Trying:
<thalesfragoso[m]> ```rust
dirbaio[m] has joined #rust-embedded
<dirbaio[m]> Nope, the compiler currently can't see "if N is the same then the two arrays' size is the same"
<dirbaio[m]> You can sorta workaround it with transmuting pointers/references/slices
<dirbaio[m]> Because their size doesn't depend on N
dngrs[m] has quit [Quit: Idle timeout reached: 172800s]
<thalesfragoso[m]> I just used transmute_copy
<thalesfragoso[m]> s//`/, s//` for now/
<thalesfragoso[m]> But now I need AtomicU128 to properly run the tests...
danielb[m] has quit [Quit: Idle timeout reached: 172800s]
rafael[m] has joined #rust-embedded
<rafael[m]> Hi, out of sudden madness and possibly explained by too much beer I have tried my hand on implementing overclocking in embassy-rp for the rp2040. After shouting at an AI for a long time and reading through the datasheet and trying to... (full message at
dngrs[m] has joined #rust-embedded
<dngrs[m]> <rafael[m]> "Hi, out of sudden madness and..." <- the #rp-rs:matrix.org might have additional people knowledgeable about this
pcs38 has quit [Quit: leaving]
<M9names[m]> Maybe the default value for the register is bad? There are 3 writable fields in that register, maybe you should set all the values instead of just the one?