I've got a shared resource that I want to protect from collisions by separate tasks, and I don't see any mutex type feature implemented within the z-stack code.
I don't want to disable interrupts, as the resource is actually the SPI interface, but I do want to avoid a second task attempting to use that interface at the same time a transaction is in progress with another peripheral.
Has anyone found a good approach to implementing something along the lines of a "critical section" such that the OSAL won't swap a task while I am checking / changing a variable? If I can just be sure that 2-3 statements will execute atomically, I'll be able to accomplish this with just a boolean variable.