mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00
Update zig: Andrew broke it all.
This commit is contained in:
parent
a028d22029
commit
a61fe26fab
@ -1 +1 @@
|
||||
0.12.0-dev.1664+8ca4a5240
|
||||
0.12.0-dev.1746+19af8aac8
|
@ -17,7 +17,7 @@ var commonRecipes: std.ArrayList([]const u8) = undefined;
|
||||
/// Reads json files recursively from all subfolders.
|
||||
pub fn readAllJsonFilesInAddons(externalAllocator: Allocator, addons: std.ArrayList(std.fs.Dir), addonNames: std.ArrayList([]const u8), subPath: []const u8, output: *std.StringHashMap(JsonElement)) !void {
|
||||
for(addons.items, addonNames.items) |addon, addonName| {
|
||||
var dir: std.fs.IterableDir = addon.openIterableDir(subPath, .{}) catch |err| {
|
||||
var dir = addon.openDir(subPath, .{.iterate = true}) catch |err| {
|
||||
if(err == error.FileNotFound) continue;
|
||||
return err;
|
||||
};
|
||||
@ -40,7 +40,7 @@ pub fn readAllJsonFilesInAddons(externalAllocator: Allocator, addons: std.ArrayL
|
||||
}
|
||||
}
|
||||
|
||||
const file = try dir.dir.openFile(entry.path, .{});
|
||||
const file = try dir.openFile(entry.path, .{});
|
||||
defer file.close();
|
||||
const string = try file.readToEndAlloc(main.stackAllocator, std.math.maxInt(usize));
|
||||
defer main.stackAllocator.free(string);
|
||||
@ -52,7 +52,7 @@ pub fn readAllJsonFilesInAddons(externalAllocator: Allocator, addons: std.ArrayL
|
||||
/// Reads text files recursively from all subfolders.
|
||||
pub fn readAllFilesInAddons(externalAllocator: Allocator, addons: std.ArrayList(std.fs.Dir), subPath: []const u8, output: *std.ArrayList([]const u8)) !void {
|
||||
for(addons.items) |addon| {
|
||||
var dir: std.fs.IterableDir = addon.openIterableDir(subPath, .{}) catch |err| {
|
||||
var dir = addon.openDir(subPath, .{.iterate = true}) catch |err| {
|
||||
if(err == error.FileNotFound) continue;
|
||||
return err;
|
||||
};
|
||||
@ -63,7 +63,7 @@ pub fn readAllFilesInAddons(externalAllocator: Allocator, addons: std.ArrayList(
|
||||
|
||||
while(try walker.next()) |entry| {
|
||||
if(entry.kind == .file) {
|
||||
const file = try dir.dir.openFile(entry.path, .{});
|
||||
const file = try dir.openFile(entry.path, .{});
|
||||
defer file.close();
|
||||
const string = try file.readToEndAlloc(externalAllocator, std.math.maxInt(usize));
|
||||
try output.append(string);
|
||||
@ -79,12 +79,12 @@ pub fn readAssets(externalAllocator: Allocator, assetPath: []const u8, blocks: *
|
||||
defer addonNames.deinit();
|
||||
|
||||
{ // Find all the sub-directories to the assets folder.
|
||||
var dir = try std.fs.cwd().openIterableDir(assetPath, .{});
|
||||
var dir = try std.fs.cwd().openDir(assetPath, .{.iterate = true});
|
||||
defer dir.close();
|
||||
var iterator = dir.iterate();
|
||||
while(try iterator.next()) |addon| {
|
||||
if(addon.kind == .directory) {
|
||||
try addons.append(try dir.dir.openDir(addon.name, .{}));
|
||||
try addons.append(try dir.openDir(addon.name, .{}));
|
||||
try addonNames.append(try main.globalAllocator.dupe(u8, addon.name));
|
||||
}
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ var partialFrame: f32 = 0;
|
||||
const animationLengthInSeconds = 5.0;
|
||||
|
||||
var curIndex: u16 = 0;
|
||||
var curEndIndex: std.atomic.Atomic(u16) = .{.value = sampleRate/60 & ~@as(u16, 1)};
|
||||
var curEndIndex: std.atomic.Value(u16) = .{.value = sampleRate/60 & ~@as(u16, 1)};
|
||||
|
||||
fn addMusic(buffer: []f32) !void {
|
||||
const musicId = if(main.game.world) |world| world.playerBiome.load(.Monotonic).preferredMusic else "cubyz";
|
||||
|
@ -777,7 +777,7 @@ pub const meshing = struct {
|
||||
sortingOutputBuffer: []FaceData = &.{},
|
||||
culledSortingCount: u31 = 0,
|
||||
lastTransparentUpdatePos: Vec3i = Vec3i{0, 0, 0},
|
||||
refCount: std.atomic.Atomic(u32) = std.atomic.Atomic(u32).init(1),
|
||||
refCount: std.atomic.Value(u32) = std.atomic.Value(u32).init(1),
|
||||
needsNeighborUpdate: bool = false,
|
||||
needsMeshUpdate: bool = false,
|
||||
mutex: std.Thread.Mutex = .{},
|
||||
@ -820,7 +820,7 @@ pub const meshing = struct {
|
||||
pub fn tryIncreaseRefCount(self: *ChunkMesh) bool {
|
||||
var prevVal = self.refCount.load(.Monotonic);
|
||||
while(prevVal != 0) {
|
||||
prevVal = self.refCount.compareAndSwap(prevVal, prevVal + 1, .Monotonic, .Monotonic) orelse return true;
|
||||
prevVal = self.refCount.cmpxchgWeak(prevVal, prevVal + 1, .Monotonic, .Monotonic) orelse return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
const Atomic = std.atomic.Atomic;
|
||||
const Atomic = std.atomic.Value;
|
||||
|
||||
const assets = @import("assets.zig");
|
||||
const chunk = @import("chunk.zig");
|
||||
@ -167,7 +167,7 @@ pub const World = struct {
|
||||
while(self.milliTime +% 100 -% newTime < 0) {
|
||||
self.milliTime +%= 100;
|
||||
var curTime = self.gameTime.load(.Monotonic);
|
||||
while(self.gameTime.tryCompareAndSwap(curTime, curTime +% 1, .Monotonic, .Monotonic)) |actualTime| {
|
||||
while(self.gameTime.cmpxchgWeak(curTime, curTime +% 1, .Monotonic, .Monotonic)) |actualTime| {
|
||||
curTime = actualTime;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ const padding: f32 = 8;
|
||||
|
||||
var connection: ?*ConnectionManager = null;
|
||||
var ipAddress: []const u8 = "";
|
||||
var gotIpAddress: std.atomic.Atomic(bool) = std.atomic.Atomic(bool).init(false);
|
||||
var gotIpAddress: std.atomic.Value(bool) = std.atomic.Value(bool).init(false);
|
||||
var thread: ?std.Thread = null;
|
||||
const width: f32 = 420;
|
||||
|
||||
|
@ -113,7 +113,7 @@ pub fn onOpen() Allocator.Error!void {
|
||||
const list = try VerticalList.init(.{padding, 16 + padding}, 300, 8);
|
||||
// TODO: try list.add(try Button.initText(.{0, 0}, 128, "Create World", gui.openWindowCallback("save_creation")));
|
||||
|
||||
var dir: std.fs.IterableDir = std.fs.cwd().makeOpenPathIterable("saves", .{}) catch |err| {
|
||||
var dir = std.fs.cwd().makeOpenPath("saves", .{.iterate = true}) catch |err| {
|
||||
std.log.err("Encountered error while trying to open folder \"saves\": {s}", .{@errorName(err)});
|
||||
return;
|
||||
};
|
||||
|
@ -668,7 +668,7 @@ pub const Window = struct {
|
||||
}
|
||||
};
|
||||
|
||||
pub var lastFrameTime = std.atomic.Atomic(f64).init(0);
|
||||
pub var lastFrameTime = std.atomic.Value(f64).init(0);
|
||||
|
||||
pub fn main() !void {
|
||||
seed = @bitCast(std.time.milliTimestamp());
|
||||
|
@ -1,7 +1,7 @@
|
||||
const builtin = @import("builtin");
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
const Atomic = std.atomic.Atomic;
|
||||
const Atomic = std.atomic.Value;
|
||||
|
||||
const assets = @import("assets.zig");
|
||||
const Block = @import("blocks.zig").Block;
|
||||
@ -613,7 +613,7 @@ pub const Protocols = struct {
|
||||
// TODO: Send the world data.
|
||||
const path = try std.fmt.allocPrint(main.stackAllocator, "saves/{s}/assets/", .{"Development"}); // TODO: Use world name.
|
||||
defer main.stackAllocator.free(path);
|
||||
var dir = try std.fs.cwd().openIterableDir(path, .{});
|
||||
var dir = try std.fs.cwd().openDir(path, .{.iterate = true});
|
||||
defer dir.close();
|
||||
var arrayList = std.ArrayList(u8).init(main.globalAllocator);
|
||||
defer arrayList.deinit();
|
||||
@ -1077,11 +1077,11 @@ pub const Protocols = struct {
|
||||
if(@abs(curTime -% expectedTime) >= 1000) {
|
||||
world.gameTime.store(expectedTime, .Monotonic);
|
||||
} else if(curTime < expectedTime) { // world.gameTime++
|
||||
while(world.gameTime.tryCompareAndSwap(curTime, curTime +% 1, .Monotonic, .Monotonic)) |actualTime| {
|
||||
while(world.gameTime.cmpxchgWeak(curTime, curTime +% 1, .Monotonic, .Monotonic)) |actualTime| {
|
||||
curTime = actualTime;
|
||||
}
|
||||
} else { // world.gameTime--
|
||||
while(world.gameTime.tryCompareAndSwap(curTime, curTime -% 1, .Monotonic, .Monotonic)) |actualTime| {
|
||||
while(world.gameTime.cmpxchgWeak(curTime, curTime -% 1, .Monotonic, .Monotonic)) |actualTime| {
|
||||
curTime = actualTime;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
const Atomic = std.atomic.Atomic;
|
||||
const Atomic = std.atomic.Value;
|
||||
|
||||
const blocks = @import("blocks.zig");
|
||||
const chunk = @import("chunk.zig");
|
||||
@ -484,7 +484,7 @@ pub const MenuBackGround = struct {
|
||||
c.glBufferData(c.GL_ELEMENT_ARRAY_BUFFER, @intCast(indices.len*@sizeOf(c_int)), &indices, c.GL_STATIC_DRAW);
|
||||
|
||||
// Load a random texture from the backgrounds folder. The player may make their own pictures which can be chosen as well.
|
||||
var dir: std.fs.IterableDir = try std.fs.cwd().makeOpenPathIterable("assets/backgrounds", .{});
|
||||
var dir = try std.fs.cwd().makeOpenPath("assets/backgrounds", .{.iterate = true});
|
||||
defer dir.close();
|
||||
|
||||
var walker = try dir.walk(main.globalAllocator);
|
||||
|
@ -104,7 +104,7 @@ pub var users: std.ArrayList(*User) = undefined;
|
||||
|
||||
pub var connectionManager: *ConnectionManager = undefined;
|
||||
|
||||
var running: std.atomic.Atomic(bool) = std.atomic.Atomic(bool).init(false);
|
||||
var running: std.atomic.Value(bool) = std.atomic.Value(bool).init(false);
|
||||
var lastTime: i128 = undefined;
|
||||
|
||||
pub var mutex: std.Thread.Mutex = .{};
|
||||
|
@ -27,7 +27,7 @@ pub const CaveBiomeMapFragment = struct {
|
||||
|
||||
pos: main.chunk.ChunkPosition,
|
||||
biomeMap: [1 << 3*(caveBiomeMapShift - caveBiomeShift)][2]*const Biome = undefined,
|
||||
refCount: std.atomic.Atomic(u16) = std.atomic.Atomic(u16).init(0),
|
||||
refCount: std.atomic.Value(u16) = std.atomic.Value(u16).init(0),
|
||||
|
||||
pub fn init(self: *CaveBiomeMapFragment, wx: i32, wy: i32, wz: i32) !void {
|
||||
self.* = .{
|
||||
@ -454,7 +454,7 @@ pub fn deinit() void {
|
||||
}
|
||||
|
||||
fn mapFragmentDeinit(mapFragment: *CaveBiomeMapFragment) void {
|
||||
if(@atomicRmw(u16, &mapFragment.refCount.value, .Sub, 1, .Monotonic) == 1) {
|
||||
if(@atomicRmw(u16, &mapFragment.refCount.raw, .Sub, 1, .Monotonic) == 1) {
|
||||
main.globalAllocator.destroy(mapFragment);
|
||||
}
|
||||
}
|
||||
@ -465,7 +465,7 @@ fn cacheInit(pos: ChunkPosition) !*CaveBiomeMapFragment {
|
||||
for(profile.caveBiomeGenerators) |generator| {
|
||||
try generator.generate(mapFragment, profile.seed ^ generator.generatorSeed);
|
||||
}
|
||||
_= @atomicRmw(u16, &mapFragment.refCount.value, .Add, 1, .Monotonic);
|
||||
_= @atomicRmw(u16, &mapFragment.refCount.raw, .Add, 1, .Monotonic);
|
||||
return mapFragment;
|
||||
}
|
||||
|
||||
@ -478,6 +478,6 @@ fn getOrGenerateFragment(_wx: i32, _wy: i32, _wz: i32) !*CaveBiomeMapFragment {
|
||||
.voxelSize = CaveBiomeMapFragment.caveBiomeSize,
|
||||
};
|
||||
const result = try cache.findOrCreate(compare, cacheInit);
|
||||
std.debug.assert(@atomicRmw(u16, &result.refCount.value, .Add, 1, .Monotonic) != 0);
|
||||
std.debug.assert(@atomicRmw(u16, &result.refCount.raw, .Add, 1, .Monotonic) != 0);
|
||||
return result;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
const Atomic = std.atomic.Atomic;
|
||||
const Atomic = std.atomic.Value;
|
||||
const Allocator = std.mem.Allocator;
|
||||
|
||||
const main = @import("root");
|
||||
@ -289,7 +289,7 @@ var cache: Cache(CaveMapFragment, cacheSize, associativity, mapFragmentDeinit) =
|
||||
var profile: TerrainGenerationProfile = undefined;
|
||||
|
||||
fn mapFragmentDeinit(mapFragment: *CaveMapFragment) void {
|
||||
if(@atomicRmw(u16, &mapFragment.refCount.value, .Sub, 1, .Monotonic) == 1) {
|
||||
if(@atomicRmw(u16, &mapFragment.refCount.raw, .Sub, 1, .Monotonic) == 1) {
|
||||
main.globalAllocator.destroy(mapFragment);
|
||||
}
|
||||
}
|
||||
@ -300,7 +300,7 @@ fn cacheInit(pos: ChunkPosition) !*CaveMapFragment {
|
||||
for(profile.caveGenerators) |generator| {
|
||||
try generator.generate(mapFragment, profile.seed ^ generator.generatorSeed);
|
||||
}
|
||||
_ = @atomicRmw(u16, &mapFragment.refCount.value, .Add, 1, .Monotonic);
|
||||
_ = @atomicRmw(u16, &mapFragment.refCount.raw, .Add, 1, .Monotonic);
|
||||
return mapFragment;
|
||||
}
|
||||
|
||||
@ -331,6 +331,6 @@ fn getOrGenerateFragment(wx: i32, wy: i32, wz: i32, voxelSize: u31) !*CaveMapFra
|
||||
.voxelSize = voxelSize,
|
||||
};
|
||||
const result = try cache.findOrCreate(compare, cacheInit);
|
||||
std.debug.assert(@atomicRmw(u16, &result.refCount.value, .Add, 1, .Monotonic) != 0);
|
||||
std.debug.assert(@atomicRmw(u16, &result.refCount.raw, .Add, 1, .Monotonic) != 0);
|
||||
return result;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
const Atomic = std.atomic.Atomic;
|
||||
const Atomic = std.atomic.Value;
|
||||
const Allocator = std.mem.Allocator;
|
||||
|
||||
const main = @import("root");
|
||||
@ -106,7 +106,7 @@ pub fn deinitGenerators() void {
|
||||
}
|
||||
|
||||
fn mapFragmentDeinit(mapFragment: *ClimateMapFragment) void {
|
||||
if(@atomicRmw(u16, &mapFragment.refCount.value, .Sub, 1, .Monotonic) == 1) {
|
||||
if(@atomicRmw(u16, &mapFragment.refCount.raw, .Sub, 1, .Monotonic) == 1) {
|
||||
main.globalAllocator.destroy(mapFragment);
|
||||
}
|
||||
}
|
||||
@ -115,7 +115,7 @@ fn cacheInit(pos: ClimateMapFragmentPosition) !*ClimateMapFragment {
|
||||
const mapFragment = try main.globalAllocator.create(ClimateMapFragment);
|
||||
mapFragment.init(pos.wx, pos.wz);
|
||||
try profile.climateGenerator.generateMapFragment(mapFragment, profile.seed);
|
||||
_ = @atomicRmw(u16, &mapFragment.refCount.value, .Add, 1, .Monotonic);
|
||||
_ = @atomicRmw(u16, &mapFragment.refCount.raw, .Add, 1, .Monotonic);
|
||||
return mapFragment;
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ pub fn deinit() void {
|
||||
fn getOrGenerateFragment(wx: i32, wz: i32) Allocator.Error!*ClimateMapFragment {
|
||||
const compare = ClimateMapFragmentPosition{.wx = wx, .wz = wz};
|
||||
const result = try cache.findOrCreate(compare, cacheInit);
|
||||
std.debug.assert(@atomicRmw(u16, &result.refCount.value, .Add, 1, .Monotonic) != 0);
|
||||
std.debug.assert(@atomicRmw(u16, &result.refCount.raw, .Add, 1, .Monotonic) != 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
const Atomic = std.atomic.Atomic;
|
||||
const Atomic = std.atomic.Value;
|
||||
const Allocator = std.mem.Allocator;
|
||||
|
||||
const main = @import("root");
|
||||
@ -127,7 +127,7 @@ pub fn deinitGenerators() void {
|
||||
}
|
||||
|
||||
fn mapFragmentDeinit(mapFragment: *MapFragment) void {
|
||||
if(@atomicRmw(u16, &mapFragment.refCount.value, .Sub, 1, .Monotonic) == 1) {
|
||||
if(@atomicRmw(u16, &mapFragment.refCount.raw, .Sub, 1, .Monotonic) == 1) {
|
||||
main.globalAllocator.destroy(mapFragment);
|
||||
}
|
||||
}
|
||||
@ -136,7 +136,7 @@ fn cacheInit(pos: MapFragmentPosition) !*MapFragment {
|
||||
const mapFragment = try main.globalAllocator.create(MapFragment);
|
||||
mapFragment.init(pos.wx, pos.wz, pos.voxelSize);
|
||||
try profile.mapFragmentGenerator.generateMapFragment(mapFragment, profile.seed);
|
||||
_ = @atomicRmw(u16, &mapFragment.refCount.value, .Add, 1, .Monotonic);
|
||||
_ = @atomicRmw(u16, &mapFragment.refCount.raw, .Add, 1, .Monotonic);
|
||||
return mapFragment;
|
||||
}
|
||||
|
||||
@ -156,6 +156,6 @@ pub fn getOrGenerateFragment(wx: i32, wz: i32, voxelSize: u31) !*MapFragment {
|
||||
voxelSize
|
||||
);
|
||||
const result = try cache.findOrCreate(compare, cacheInit);
|
||||
std.debug.assert(@atomicRmw(u16, &result.refCount.value, .Add, 1, .Monotonic) != 0);
|
||||
std.debug.assert(@atomicRmw(u16, &result.refCount.raw, .Add, 1, .Monotonic) != 0);
|
||||
return result;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
const Atomic = std.atomic.Atomic;
|
||||
const Atomic = std.atomic.Value;
|
||||
const builtin = @import("builtin");
|
||||
|
||||
const main = @import("main.zig");
|
||||
@ -24,7 +24,7 @@ pub const Compression = struct {
|
||||
return try decomp.reader().readAll(buf);
|
||||
}
|
||||
|
||||
pub fn pack(sourceDir: std.fs.IterableDir, writer: anytype) !void {
|
||||
pub fn pack(sourceDir: std.fs.Dir, writer: anytype) !void {
|
||||
var comp = try std.compress.deflate.compressor(main.globalAllocator, writer, .{.level = .default_compression});
|
||||
defer comp.deinit();
|
||||
var walker = try sourceDir.walk(main.globalAllocator);
|
||||
@ -46,7 +46,7 @@ pub const Compression = struct {
|
||||
_ = try comp.write(&len);
|
||||
_ = try comp.write(relPath);
|
||||
|
||||
const file = try sourceDir.dir.openFile(relPath, .{});
|
||||
const file = try sourceDir.openFile(relPath, .{});
|
||||
defer file.close();
|
||||
const fileData = try file.readToEndAlloc(main.stackAllocator, std.math.maxInt(u32));
|
||||
defer main.stackAllocator.free(fileData);
|
||||
@ -598,14 +598,14 @@ pub const ThreadPool = struct {
|
||||
const refreshTime: u32 = 100; // The time after which all priorities get refreshed in milliseconds.
|
||||
|
||||
threads: []std.Thread,
|
||||
currentTasks: []std.atomic.Atomic(?*const VTable),
|
||||
currentTasks: []Atomic(?*const VTable),
|
||||
loadList: *BlockingMaxHeap(Task),
|
||||
allocator: Allocator,
|
||||
|
||||
pub fn init(allocator: Allocator, threadCount: usize) !ThreadPool {
|
||||
const self = ThreadPool {
|
||||
.threads = try allocator.alloc(std.Thread, threadCount),
|
||||
.currentTasks = try allocator.alloc(std.atomic.Atomic(?*const VTable), threadCount),
|
||||
.currentTasks = try allocator.alloc(Atomic(?*const VTable), threadCount),
|
||||
.loadList = try BlockingMaxHeap(Task).init(allocator),
|
||||
.allocator = allocator,
|
||||
};
|
||||
@ -801,13 +801,13 @@ pub fn Cache(comptime T: type, comptime numberOfBuckets: u32, comptime bucketSiz
|
||||
/// Tries to find the entry that fits to the supplied hashable.
|
||||
pub fn find(self: *@This(), compareAndHash: anytype) ?*T {
|
||||
const index: u32 = compareAndHash.hashCode() & hashMask;
|
||||
_ = @atomicRmw(usize, &self.cacheRequests.value, .Add, 1, .Monotonic);
|
||||
_ = @atomicRmw(usize, &self.cacheRequests.raw, .Add, 1, .Monotonic);
|
||||
self.buckets[index].mutex.lock();
|
||||
defer self.buckets[index].mutex.unlock();
|
||||
if(self.buckets[index].find(compareAndHash)) |item| {
|
||||
return item;
|
||||
}
|
||||
_ = @atomicRmw(usize, &self.cacheMisses.value, .Add, 1, .Monotonic);
|
||||
_ = @atomicRmw(usize, &self.cacheMisses.raw, .Add, 1, .Monotonic);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1001,9 +1001,9 @@ pub const TimeDifference = struct {
|
||||
self.firstValue = false;
|
||||
}
|
||||
if(timeDifference -% self.difference.load(.Monotonic) > 0) {
|
||||
_ = @atomicRmw(i16, &self.difference.value, .Add, 1, .Monotonic);
|
||||
_ = @atomicRmw(i16, &self.difference.raw, .Add, 1, .Monotonic);
|
||||
} else if(timeDifference -% self.difference.load(.Monotonic) < 0) {
|
||||
_ = @atomicRmw(i16, &self.difference.value, .Add, -1, .Monotonic);
|
||||
_ = @atomicRmw(i16, &self.difference.raw, .Add, -1, .Monotonic);
|
||||
}
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user