Linux 커널의 container_of 매크로 이해 Linux 커널을 탐색 할 때 container_of다음과 같이 정의 된 매크로를 찾았습니다 . #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) container_of가 무엇을하는지 이해하지만 이해하지 못하는 것은 마지막 문장입니다. (type *)( (char *)__mptr - offsetof(type,member) );}) 다음과 같이 매크로를 사용하는 경우 : container_of(dev, struct wifi_devi..