Files
lab-rv32i-freertos-c-first-…/doc/assets/a3-dispatch.puml
T

24 lines
914 B
Plaintext

@startuml
!include card-uml-style.iuml
scale 900 width
top to bottom direction
class "01 TaskFunction_t\nvoid (*)(void*)" as Callback <<C ABI>>
class "02 xTaskCreate\nentry + &workerA" as Create <<boundary>>
class "03 callback entry\na0 = pvParameters" as Entry <<runtime>>
class "04 typed pointer\nWorkerContext *worker =\n(WorkerContext *)pvParameters" as Cast <<C>>
class "05 typed calculation\nworker->result = sum" as Work <<application>>
class "06 wrong-cast exhibit\nC cannot verify context type" as Hazard <<compile-time check>>
Callback -right-> Create : accepted signature
Create -right-> Entry : scheduler dispatch
Entry -down-> Cast : same address
Cast -left-> Work : typed fields
Work -left-> Hazard : contrast: unchecked cast
note bottom of Entry
RV32 ILP32 ABI carries the first callback argument in a0.
The explicit C cast documents intent; it performs no type check.
end note
@enduml