#pragma once #include #include #ifdef __cplusplus extern "C" { #endif #define rt_container_of(ptr, type, member) \ ((type *)((uintptr_t)(ptr) - offsetof(type, member))) #ifdef __cplusplus } #endif