1 #define container_of(ptr, type, member) ({            \
2     const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
3     (type *)( (char *)__mptr - offsetof(type,member) );})
View Code

相关文章:

  • 2021-05-09
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-06-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2021-05-25
  • 2022-01-16
  • 2022-12-23
相关资源
相似解决方案