使process模块能以O3优化下运行

This commit is contained in:
fslongjin
2022-08-01 21:42:23 +08:00
parent e806bbc0c8
commit f06ed2d886
7 changed files with 62 additions and 23 deletions

View File

@ -93,6 +93,7 @@ struct List
static inline void list_init(struct List *list)
{
list->next = list;
io_mfence();
list->prev = list;
}
@ -106,8 +107,11 @@ static inline void list_add(struct List *entry, struct List *node)
{
node->next = entry->next;
barrier();
node->prev = entry;
barrier();
node->next->prev = node;
barrier();
entry->next = node;
}