123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- typedef struct {
- char identifier[4];
- uint8_t zero;
- uint8_t size;
- uint16_t version;
- uint8_t ptrsize;
- uint8_t timesize;
- uint8_t threadsize;
- uint8_t off_prio;
- uint8_t off_ctx;
- uint8_t off_newer;
- uint8_t off_older;
- uint8_t off_name;
- uint8_t off_stklimit;
- uint8_t off_state;
- uint8_t off_flags;
- uint8_t off_refs;
- uint8_t off_preempt;
- uint8_t off_time;
- } chdebug_t;
- (tp)->older->newer = (tp)->newer; \
- (tp)->newer->older = (tp)->older; \
- }
- (tp)->newer = (thread_t *)&ch.rlist; \
- (tp)->older = ch.rlist.older; \
- (tp)->older->newer = (tp); \
- ch.rlist.older = (tp); \
- }
- extern "C" {
- extern ROMCONST chdebug_t ch_debug;
- thread_t *chRegFirstThread(void);
- thread_t *chRegNextThread(thread_t *tp);
- thread_t *chRegFindThreadByName(const char *name);
- thread_t *chRegFindThreadByPointer(thread_t *tp);
- thread_t *chRegFindThreadByWorkingArea(stkalign_t *wa);
- }
- static inline void chRegSetThreadName(const char *name) {
- ch.rlist.current->name = name;
- (void)name;
- }
- static inline const char *chRegGetThreadNameX(thread_t *tp) {
- return tp->name;
- (void)tp;
- return NULL;
- }
- static inline void chRegSetThreadNameX(thread_t *tp, const char *name) {
- tp->name = name;
- (void)tp;
- (void)name;
- }
|