摘要:
拷贝自:https://blog.csdn.net/hazir/article/details/9429017 看到很多C代码的结构体赋值都是用memcpy函数来拷贝,其实根本不需要,用等号直接赋值即可。结构体描述的是的一块连续内存的内存布局,同类型的一个结构体变量给另一个结构体变量赋值,使用等号编 阅读全文
摘要:
/** * rt_container_of - return the member address of ptr, if the type of ptr is the * struct type. */ #define rt_container_of(ptr, type, member) \ ((t 阅读全文