@startuml scale 700 height skinparam backgroundColor transparent skinparam shadowing false skinparam defaultFontName Monospace skinparam defaultFontSize 12 skinparam stateBorderColor #2c7794 skinparam stateBackgroundColor #edf6fa title A6 STATE — value and pending are separate state [*] --> ClearCount : 01 value=0 / not pending ClearCount --> WaitingCount : 03 wait WaitingCount --> Count3 : 04 three gives Count3 --> ClearOverwrite : 05 take(pdTRUE) returns 3 ClearOverwrite --> WaitingOverwrite : 06 wait WaitingOverwrite --> Value11 : overwrite 0x11 Value11 --> Value22 : overwrite 0x22 Value22 --> ClearBits : 08 wait returns 0x22 ClearBits --> WaitingBits : 09 wait WaitingBits --> Bits04 : set 0x04 Bits04 --> Bits24 : OR 0x20 Bits24 --> ClearDone : 11 wait returns 0x24 ClearDone --> [*] : 12 PASS @enduml