mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-27 21:58:20 +00:00
ex: add enqueued check to workqueue
This commit is contained in:
@@ -123,6 +123,10 @@ pub fn enqueue(item: *WorkItem) void {
|
||||
const ipl = ke.ipl.raise(.Dispatch);
|
||||
defer ke.ipl.lower(ipl);
|
||||
|
||||
if (item.enqueued.cmpxchgStrong(false, true, .acquire, .monotonic) != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var pool: *Pool = undefined;
|
||||
|
||||
switch (item.priority) {
|
||||
|
||||
Reference in New Issue
Block a user