| ... | ... | @@ -306,7 +306,7 @@ const FreebsdImpl = struct { |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | const rc = os.freebsd._umtx_op( |
| 309 | | @intFromPtr(&ptr.value), |
| 309 | @intFromPtr(&ptr.raw), |
| 310 | 310 | @intFromEnum(os.freebsd.UMTX_OP.WAIT_UINT_PRIVATE), |
| 311 | 311 | @as(c_ulong, expect), |
| 312 | 312 | tm_size, |
| ... | ... | @@ -328,7 +328,7 @@ const FreebsdImpl = struct { |
| 328 | 328 | |
| 329 | 329 | fn wake(ptr: *const atomic.Value(u32), max_waiters: u32) void { |
| 330 | 330 | const rc = os.freebsd._umtx_op( |
| 331 | | @intFromPtr(&ptr.value), |
| 331 | @intFromPtr(&ptr.raw), |
| 332 | 332 | @intFromEnum(os.freebsd.UMTX_OP.WAKE_PRIVATE), |
| 333 | 333 | @as(c_ulong, max_waiters), |
| 334 | 334 | 0, // there is no timeout struct |
| ... | ... | @@ -354,7 +354,7 @@ const OpenbsdImpl = struct { |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | const rc = os.openbsd.futex( |
| 357 | | @as(*const volatile u32, @ptrCast(&ptr.value)), |
| 357 | @as(*const volatile u32, @ptrCast(&ptr.raw)), |
| 358 | 358 | os.openbsd.FUTEX_WAIT | os.openbsd.FUTEX_PRIVATE_FLAG, |
| 359 | 359 | @as(c_int, @bitCast(expect)), |
| 360 | 360 | if (timeout != null) &ts else null, |
| ... | ... | @@ -379,7 +379,7 @@ const OpenbsdImpl = struct { |
| 379 | 379 | |
| 380 | 380 | fn wake(ptr: *const atomic.Value(u32), max_waiters: u32) void { |
| 381 | 381 | const rc = os.openbsd.futex( |
| 382 | | @as(*const volatile u32, @ptrCast(&ptr.value)), |
| 382 | @as(*const volatile u32, @ptrCast(&ptr.raw)), |
| 383 | 383 | os.openbsd.FUTEX_WAKE | os.openbsd.FUTEX_PRIVATE_FLAG, |
| 384 | 384 | std.math.cast(c_int, max_waiters) orelse std.math.maxInt(c_int), |
| 385 | 385 | null, // FUTEX_WAKE takes no timeout ptr |
| ... | ... | @@ -414,7 +414,7 @@ const DragonflyImpl = struct { |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | const value = @as(c_int, @bitCast(expect)); |
| 417 | | const addr = @as(*const volatile c_int, @ptrCast(&ptr.value)); |
| 417 | const addr = @as(*const volatile c_int, @ptrCast(&ptr.raw)); |
| 418 | 418 | const rc = os.dragonfly.umtx_sleep(addr, value, timeout_us); |
| 419 | 419 | |
| 420 | 420 | switch (os.errno(rc)) { |
| ... | ... | @@ -443,7 +443,7 @@ const DragonflyImpl = struct { |
| 443 | 443 | // https://man.dragonflybsd.org/?command=umtx&section=2 |
| 444 | 444 | // > umtx_wakeup() will generally return 0 unless the address is bad. |
| 445 | 445 | // We are fine with the address being bad (e.g. for Semaphore.post() where Semaphore.wait() frees the Semaphore) |
| 446 | | const addr = @as(*const volatile c_int, @ptrCast(&ptr.value)); |
| 446 | const addr = @as(*const volatile c_int, @ptrCast(&ptr.raw)); |
| 447 | 447 | _ = os.dragonfly.umtx_wakeup(addr, to_wake); |
| 448 | 448 | } |
| 449 | 449 | }; |
| ... | ... | @@ -461,7 +461,7 @@ const WasmImpl = struct { |
| 461 | 461 | \\memory.atomic.wait32 0 |
| 462 | 462 | \\local.set %[ret] |
| 463 | 463 | : [ret] "=r" (-> u32), |
| 464 | | : [ptr] "r" (&ptr.value), |
| 464 | : [ptr] "r" (&ptr.raw), |
| 465 | 465 | [expected] "r" (@as(i32, @bitCast(expect))), |
| 466 | 466 | [timeout] "r" (to), |
| 467 | 467 | ); |
| ... | ... | @@ -484,7 +484,7 @@ const WasmImpl = struct { |
| 484 | 484 | \\memory.atomic.notify 0 |
| 485 | 485 | \\local.set %[ret] |
| 486 | 486 | : [ret] "=r" (-> u32), |
| 487 | | : [ptr] "r" (&ptr.value), |
| 487 | : [ptr] "r" (&ptr.raw), |
| 488 | 488 | [waiters] "r" (max_waiters), |
| 489 | 489 | ); |
| 490 | 490 | _ = woken_count; // can be 0 when linker flag 'shared-memory' is not enabled |