Add an internal queue with a separate lock, this is a small section
which just copies the arguments making it suitable for a critical
section.
Emptying this queue is handled from a separate lock, which is a trylock.
If the queue is already being emptied, it is safe to return after adding
to the queue (no need to block).
Change-Id: I45bbf749b2cb8687bb5d8e485adde2256b2c99a8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/21881
Reviewed-by: Paul Mathieu <paulmathieu@google.com>
Commit-Queue: Rob Oliver <rgoliver@google.com>
Tokenized trace, implements trace events by tokenizing all compile time
information of the event into a 32bit number (using tokenizer module).
This CL just adds the encoding of trace events and callback hooks,
buffering which usies the callback will be added in a future CL.
Test: passes included test
Change-Id: Ibfcc34211c09965af8da030e28dba5e8f7c6ccdb
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/11428
Commit-Queue: Rob Oliver <rgoliver@google.com>
Reviewed-by: (☞゚∀゚)☞ Tennessee Carmel-Veilleux <tennessee@google.com>
Reviewed-by: Keir Mierle <keir@google.com>