Linux內核中container_of函數詳解

在Linux 內核中,container_of 函數使用非常廣,例如 Linux內核鏈表 list_head、工作隊列work_struct中。 在Linux 內核中有一個大名鼎鼎的宏container_of(),這個宏是用來幹嘛的呢?我們先來看看它在內核中是怎樣定義的。 呵呵,乍一看不知道是什麼東東。 我們先來分析一下container_of(ptr,type,member),這裏面有ptr,t
相關文章
相關標籤/搜索