xref: /aosp_15_r20/external/pigweed/pw_sync_baremetal/docs.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker.. _module-pw_sync_baremetal:
2*61c4878aSAndroid Build Coastguard Worker
3*61c4878aSAndroid Build Coastguard Worker=================
4*61c4878aSAndroid Build Coastguard Workerpw_sync_baremetal
5*61c4878aSAndroid Build Coastguard Worker=================
6*61c4878aSAndroid Build Coastguard WorkerThis is a set of backends for pw_sync that works on baremetal targets. It is not
7*61c4878aSAndroid Build Coastguard Workerready for use, and is under construction.
8*61c4878aSAndroid Build Coastguard Worker
9*61c4878aSAndroid Build Coastguard Worker.. note::
10*61c4878aSAndroid Build Coastguard Worker  All constructs in this baremetal backend do not support hardware
11*61c4878aSAndroid Build Coastguard Worker  multi-threading (SMP, SMT, etc).
12*61c4878aSAndroid Build Coastguard Worker
13*61c4878aSAndroid Build Coastguard Worker.. warning::
14*61c4878aSAndroid Build Coastguard Worker  It does not perform interrupt masking or disable global interrupts. This is
15*61c4878aSAndroid Build Coastguard Worker  not safe to use yet!
16*61c4878aSAndroid Build Coastguard Worker
17*61c4878aSAndroid Build Coastguard Worker-----------------
18*61c4878aSAndroid Build Coastguard WorkerInterruptSpinLock
19*61c4878aSAndroid Build Coastguard Worker-----------------
20*61c4878aSAndroid Build Coastguard WorkerThe interrupt spin-lock implementation makes a single attempt to acquire the
21*61c4878aSAndroid Build Coastguard Workerlock and asserts if it is unavailable. It does not perform interrupt masking or
22*61c4878aSAndroid Build Coastguard Workerdisable global interrupts.
23*61c4878aSAndroid Build Coastguard Worker
24*61c4878aSAndroid Build Coastguard Worker-----
25*61c4878aSAndroid Build Coastguard WorkerMutex
26*61c4878aSAndroid Build Coastguard Worker-----
27*61c4878aSAndroid Build Coastguard WorkerThe mutex implementation makes a single attempt to acquire the lock and asserts
28*61c4878aSAndroid Build Coastguard Workerif it is unavailable.
29*61c4878aSAndroid Build Coastguard Worker
30*61c4878aSAndroid Build Coastguard Worker--------------
31*61c4878aSAndroid Build Coastguard WorkerRecursiveMutex
32*61c4878aSAndroid Build Coastguard Worker--------------
33*61c4878aSAndroid Build Coastguard WorkerThe recursive mutex implementation counts the number of lock and unlock calls
34*61c4878aSAndroid Build Coastguard Workerand asserts if the mutex is unlocked too many times or destroyed while locked.
35*61c4878aSAndroid Build Coastguard WorkerNote that recursive mutexes are not available for general use in Pigweed.
36