arm: async changes
- more tracing - pending resume() notifications - idle function returns bool (useful for testing) may not build (more stuff coming in later commits)
This commit is contained in:
40
arm/trace.h
40
arm/trace.h
@@ -1,14 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#define TRACE_DUMP_WHEN_FULL 0
|
||||
|
||||
#ifdef __x86_64__
|
||||
#include <cstdio>
|
||||
#define TRACE(x) printf(#x "\n")
|
||||
#else // __x86_64__
|
||||
#define TRACE(...) tracing::trace(__VA_ARGS__)
|
||||
#endif // __x86_64__
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace tracing {
|
||||
enum class TraceEvent : uint8_t {
|
||||
kUnknown = 0,
|
||||
|
||||
kUartIsr,
|
||||
kUartRxCb,
|
||||
kUartTxCb,
|
||||
kUartIsr = 1,
|
||||
kUartRxCb = 2,
|
||||
kUartTxCb = 3,
|
||||
|
||||
kUartSend = 10,
|
||||
kUartRecv = 11,
|
||||
kUartTxBufferFull = 12,
|
||||
kUartTxBufferNotFull = 13,
|
||||
|
||||
kUartWriteDone = 20,
|
||||
|
||||
kAsyncResume = 4,
|
||||
kAsyncEnqueue = 5,
|
||||
kAsyncTask = 6,
|
||||
kAsyncResumeSetPending = 7,
|
||||
kAsyncAwaitWasNotified = 8,
|
||||
kAsyncSchedule = 9,
|
||||
|
||||
kAsyncTaskDone = 14,
|
||||
kAsyncException = 15,
|
||||
kAsyncCallParent = 16,
|
||||
kAsyncCallParentDone = 17,
|
||||
kAsyncCoAwait = 18,
|
||||
kAsyncSuspend = 19,
|
||||
kAsyncDestroy = 21,
|
||||
|
||||
kAsyncGimmeWaiting = 22,
|
||||
kAsyncGimmeResume = 23,
|
||||
};
|
||||
|
||||
void trace(TraceEvent event);
|
||||
|
||||
Reference in New Issue
Block a user