摘要:
拷贝自:https://blog.csdn.net/hazir/article/details/9429017 看到很多C代码的结构体赋值都是用memcpy函数来拷贝,其实根本不需要,用等号直接赋值即可。结构体描述的是的一块连续内存的内存布局,同类型的一个结构体变量给另一个结构体变量赋值,使用等号编 阅读全文
posted @ 2020-10-12 17:46
不明白就去明白
阅读(8677)
评论(0)
推荐(2)
摘要:
/** * 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 阅读全文
posted @ 2020-10-12 13:42
不明白就去明白
阅读(1498)
评论(0)
推荐(1)

浙公网安备 33010602011771号