On 7/11/2025 3:54 PM, Danilo Krummrich wrote: > On Fri Jul 11, 2025 at 9:35 PM CEST, Joel Fernandes wrote: >> It looks good to me. A few high-level comments: >> >> 1. If we don't expect the concurrency issue for this in C code, why do we >> expect it to happen in rust? > > The race can happen in C as well, but people would probably argue that no one > ever calls the mask setter function concurrently to DMA allocation and mapping > primitives. > After going through the DMA code some more, I am convinced the concurrency is an issue so marking the higher-level rust wrapper as unsafe { } makes sense. Thanks Danilo for the discussion and Miguel also for the clarifications on the other thread. - Joel