epoll 底層實現總結

當一進程調用epoll_create方法時,Linux內核會建立一個eventpoll結構體,這個結構體中有兩個成員與epoll的使用方式密切相關。eventpoll結構體以下所示:node struct eventpoll{     ....     /*紅黑樹的根節點,這顆樹中存儲着全部添加到epoll中的須要監控的事件*/     struct rb_root  rbr;     /*雙鏈表
相關文章
相關標籤/搜索