mirror of
https://github.com/rdmsr/zag.git
synced 2026-11-01 15:48:21 +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);
|
const ipl = ke.ipl.raise(.Dispatch);
|
||||||
defer ke.ipl.lower(ipl);
|
defer ke.ipl.lower(ipl);
|
||||||
|
|
||||||
|
if (item.enqueued.cmpxchgStrong(false, true, .acquire, .monotonic) != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var pool: *Pool = undefined;
|
var pool: *Pool = undefined;
|
||||||
|
|
||||||
switch (item.priority) {
|
switch (item.priority) {
|
||||||
|
|||||||
Reference in New Issue
Block a user