diff --git a/os/kernel/src/chregistry.c b/os/kernel/src/chregistry.c index 2e63a13f6..971133457 100644 --- a/os/kernel/src/chregistry.c +++ b/os/kernel/src/chregistry.c @@ -50,7 +50,7 @@ #if CH_USE_REGISTRY || defined(__DOXYGEN__) -#define offsetof(st, m) \ +#define _offsetof(st, m) \ ((size_t)((char *)&((st *)0)->m - (char *)0)) /* @@ -66,29 +66,29 @@ ROMCONST chroot_t ch_root = { (uint8_t)sizeof (void *), (uint8_t)sizeof (systime_t), (uint8_t)sizeof (Thread), - (uint8_t)offsetof(Thread, p_prio), - (uint8_t)offsetof(Thread, p_ctx), - (uint8_t)offsetof(Thread, p_newer), - (uint8_t)offsetof(Thread, p_older), - (uint8_t)offsetof(Thread, p_name), + (uint8_t)_offsetof(Thread, p_prio), + (uint8_t)_offsetof(Thread, p_ctx), + (uint8_t)_offsetof(Thread, p_newer), + (uint8_t)_offsetof(Thread, p_older), + (uint8_t)_offsetof(Thread, p_name), #if CH_DBG_ENABLE_STACK_CHECK - (uint8_t)offsetof(Thread, p_stklimit), + (uint8_t)_offsetof(Thread, p_stklimit), #else (uint8_t)0, #endif - (uint8_t)offsetof(Thread, p_state), - (uint8_t)offsetof(Thread, p_flags), + (uint8_t)_offsetof(Thread, p_state), + (uint8_t)_offsetof(Thread, p_flags), #if CH_USE_DYNAMIC - (uint8_t)offsetof(Thread, p_refs), + (uint8_t)_offsetof(Thread, p_refs), #else (uint8_t)0, #endif #if CH_TIME_QUANTUM > 0 - (uint8_t)offsetof(Thread, p_preempt), + (uint8_t)_offsetof(Thread, p_preempt), #else (uint8_t)0, #endif - (uint8_t)offsetof(Thread, p_time) + (uint8_t)_offsetof(Thread, p_time) }; /**