mm_inline.h

来自「linux 内核源代码」· C头文件 代码 · 共 41 行

H
41
字号
static inline voidadd_page_to_active_list(struct zone *zone, struct page *page){	list_add(&page->lru, &zone->active_list);	__inc_zone_state(zone, NR_ACTIVE);}static inline voidadd_page_to_inactive_list(struct zone *zone, struct page *page){	list_add(&page->lru, &zone->inactive_list);	__inc_zone_state(zone, NR_INACTIVE);}static inline voiddel_page_from_active_list(struct zone *zone, struct page *page){	list_del(&page->lru);	__dec_zone_state(zone, NR_ACTIVE);}static inline voiddel_page_from_inactive_list(struct zone *zone, struct page *page){	list_del(&page->lru);	__dec_zone_state(zone, NR_INACTIVE);}static inline voiddel_page_from_lru(struct zone *zone, struct page *page){	list_del(&page->lru);	if (PageActive(page)) {		__ClearPageActive(page);		__dec_zone_state(zone, NR_ACTIVE);	} else {		__dec_zone_state(zone, NR_INACTIVE);	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?