mirror of
https://github.com/rdmsr/zag.git
synced 2026-11-01 15:48:21 +00:00
fix(mm/phys): use wrapping addition
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ fn push_to_pool(batch: *mm.Page) void {
|
|||||||
|
|
||||||
const new_head = GlobalHead{
|
const new_head = GlobalHead{
|
||||||
.pfn = mm.struct_page_to_pfn(batch),
|
.pfn = mm.struct_page_to_pfn(batch),
|
||||||
.tag = old_head.tag + 1,
|
.tag = old_head.tag +% 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
old_head = batch_pool.cmpxchgWeak(old_head, new_head, .acq_rel, .acquire) orelse break;
|
old_head = batch_pool.cmpxchgWeak(old_head, new_head, .acq_rel, .acquire) orelse break;
|
||||||
|
|||||||
Reference in New Issue
Block a user