Shared Memory with Preemption Locks
In this design pattern, two tasks transfer data to each other using shared memory, as shown in Figure 15.15. Each task is responsible for disabling preemption before accessing the shared memory. Unlike using a binary semaphore or a mutex lock, no waiting is invovled when using a preemption lock for synchronization.
Figure 15.15: Task-to-task resource synchronization-shared memory guarded by preemption lock.