aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/debug.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-01 13:59:31 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-01 13:59:31 +0000
commitad6e94828f737d658fcfeca90067d857458c7555 (patch)
tree4ff3ce1f31ead644484d0221bd7ba40eca986ce9 /src/include/debug.h
parent53e4f68189cf27bc49f2d92bc869c93bd886876b (diff)
downloadChibiOS-ad6e94828f737d658fcfeca90067d857458c7555.tar.gz
ChibiOS-ad6e94828f737d658fcfeca90067d857458c7555.tar.bz2
ChibiOS-ad6e94828f737d658fcfeca90067d857458c7555.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@708 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/debug.h')
-rw-r--r--src/include/debug.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/include/debug.h b/src/include/debug.h
index 52c15cf08..631882fad 100644
--- a/src/include/debug.h
+++ b/src/include/debug.h
@@ -36,17 +36,23 @@
*/
#define MEM_FILL_PATTERN 0x55
+/**
+ * @brief Trace buffer record.
+ */
typedef struct {
- void *cse_wtobjp;
- systime_t cse_time;
- uint16_t cse_state: 4;
- uint16_t cse_tid: 12;
+ void *cse_wtobjp; /**< Object where going to sleep.*/
+ systime_t cse_time; /**< Time of the switch event.*/
+ uint16_t cse_state: 4; /**< Switched out thread state.*/
+ uint16_t cse_tid: 12; /**< Switched in thdread id.*/
} CtxSwcEvent;
+/**
+ * @brief Trace buffer header.
+ */
typedef struct {
- size_t tb_size;
- CtxSwcEvent *tb_ptr;
- CtxSwcEvent tb_buffer[TRACE_BUFFER_SIZE];
+ unsigned tb_size; /**< Trace buffer size (records).*/
+ CtxSwcEvent *tb_ptr; /**< Pointer to the ring buffer front.*/
+ CtxSwcEvent tb_buffer[TRACE_BUFFER_SIZE]; /**< Ring buffer.*/
} TraceBuffer;
extern CtxSwcEvent *dbgnext;