![](https://i-blog.csdnimg.cn/blog_migrate/7cd27f4a96ce7734191abd188fa2e547.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/b4eea72e20c61bb67815ff09937f1f09.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/69bde55507fdb11f4c70ec60b4d29b5e.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/9499057c1e0751ffcc4a256eefe89238.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/d21392a4e7699bd89d98e6371efa4469.gif)
将new所代表的list_head插入到next索引的双链表(next索引双链表的第一个节点)的尾部
![](https://i-blog.csdnimg.cn/blog_migrate/c1b4e3567a75e0744fe68e0e79e9f1be.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/f9fd51181bcf263aa2c99e9af5c855ab.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/a2fad96d1b42c1a2338388a9896d1597.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/7f61dc522cb61699782a799fa9c8a5c8.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/51558e7c5b64e753823c4ba9dd97dbe3.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/829f506859d6b0b901fba188cbcb0e2d.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/f2b6ab33da843d11dd54a903459d6753.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/b75f582171f6f6481ce6c3d707e12691.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/35a931a6409793eeecb87dfaa83925c4.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/000dbee566e3f391da9a1342e3fe8bf0.gif)
next
new head----+----------------------------------------------+
| | |
| list_head | list_head list_head list_head |
| |---------| | |---------| |---------| |---------| |
+-->| *next | +--->| *next |-->| *next |-->| *next |---+
|---------| |---------| |---------| |---------|
| *prev | +--| *prev |<--| *prev |<--| *prev |<--+---prev
|---------| | |---------| |---------| |---------| |
| |
+--------------------------------------------+
+---------------------+
| next | (4)
new| head----+ +-----------------------------------------+
| | | |
+--+ list_head | list_head list_head list_head |
| |---------|(2) | |---------| |---------| |---------| |
+-->| *next |-----+--->| *next |-->| *next |-->| *next |---+
|---------| |---------| |---------| |---------|
+---| *prev |<---------| *prev |<--| *prev |<--| *prev |<--+---prev
| |---------| (1) |---------| |---------| |---------| |
| |
+------------------------------------------------------------------+