diff options
author | 2021-12-30 21:12:32 -0800 | |
---|---|---|
committer | 2021-12-30 21:12:32 -0800 | |
commit | e75c711c68896f5952793601f156c921c814caab (patch) | |
tree | f3b30e2281c7231d480bb84503d17b2370866ff9 /src/futex.zig | |
parent | 8d031f13c0e04629d431176e211a31224b7618c0 (diff) | |
download | bun-e75c711c68896f5952793601f156c921c814caab.tar.gz bun-e75c711c68896f5952793601f156c921c814caab.tar.zst bun-e75c711c68896f5952793601f156c921c814caab.zip |
Upgrade to latest Zig, remove dependency on patched version of Zig (#96)
* Prepare to upgrade zig
* zig fmt
* AllocGate
* Update data_url.zig
* wip
* few files
* just headers now?
* I think everything works?
* Update mimalloc
* Update hash_map.zig
* Perf improvements to compensate for Allocgate
* Bump
* :camera:
* Update bun.lockb
* Less branching
* [js parser] Slightly reduce memory usage
* Update js_parser.zig
* WIP remove unused
* [JS parser] WIP support for `with` keyword
* Remove more dead code
* Fix all the build errors!
* cleanup
* Move `network_thread` up
* Bump peechy
* Update README.md
Diffstat (limited to 'src/futex.zig')
-rw-r--r-- | src/futex.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/futex.zig b/src/futex.zig index 777277dca..671d17b0d 100644 --- a/src/futex.zig +++ b/src/futex.zig @@ -109,8 +109,8 @@ const WindowsFutex = struct { } switch (windows.ntdll.RtlWaitOnAddress( - @ptrCast(?*const c_void, ptr), - @ptrCast(?*const c_void, &expect), + @ptrCast(?*const anyopaque, ptr), + @ptrCast(?*const anyopaque, &expect), @sizeOf(@TypeOf(expect)), timeout_ptr, )) { @@ -121,7 +121,7 @@ const WindowsFutex = struct { } fn wake(ptr: *const Atomic(u32), num_waiters: u32) void { - const address = @ptrCast(?*const c_void, ptr); + const address = @ptrCast(?*const anyopaque, ptr); switch (num_waiters) { 1 => windows.ntdll.RtlWakeAddressSingle(address), else => windows.ntdll.RtlWakeAddressAll(address), @@ -191,7 +191,7 @@ const DarwinFutex = struct { assert(timeout_value != 0); timeout_ns = timeout_value; } - const addr = @ptrCast(*const c_void, ptr); + const addr = @ptrCast(*const anyopaque, ptr); const flags = darwin.UL_COMPARE_AND_WAIT | darwin.ULF_NO_ERRNO; // If we're using `__ulock_wait` and `timeout` is too big to fit inside a `u32` count of // micro-seconds (around 70min), we'll request a shorter timeout. This is fine (users @@ -226,7 +226,7 @@ const DarwinFutex = struct { } while (true) { - const addr = @ptrCast(*const c_void, ptr); + const addr = @ptrCast(*const anyopaque, ptr); const status = darwin.__ulock_wake(flags, addr, 0); if (status >= 0) return; |