Comment on Circular Linked Lists – Attributes, Implementation and UsesparentComments−a136920999312yActually, the problem is that you're iterating through task_structs when you should be iterating through struct list_heads: struct list_head* head = &this->children; struct list_head* i = head->next; for(; i!=head ;i=i->next) { task_struct* child = container_of(i,task_struct,sibling); /* do stuff */ }
Comments
Actually, the problem is that you're iterating through task_structs when you should be iterating through struct list_heads: