| ... | @@ -26,6 +26,8 @@ const Type = @import("../Type.zig"); | ... | @@ -26,6 +26,8 @@ const Type = @import("../Type.zig"); |
| 26 | const Value = @import("../Value.zig"); | 26 | const Value = @import("../Value.zig"); |
| 27 | const Zcu = @import("../Zcu.zig"); | 27 | const Zcu = @import("../Zcu.zig"); |
| 28 | const Zir = std.zig.Zir; | 28 | const Zir = std.zig.Zir; |
| | 29 | const Zoir = std.zig.Zoir; |
| | 30 | const ZonGen = std.zig.ZonGen; |
| 29 | | 31 | |
| 30 | zcu: *Zcu, | 32 | zcu: *Zcu, |
| 31 | | 33 | |
| ... | @@ -73,6 +75,8 @@ pub fn destroyFile(pt: Zcu.PerThread, file_index: Zcu.File.Index) void { | ... | @@ -73,6 +75,8 @@ pub fn destroyFile(pt: Zcu.PerThread, file_index: Zcu.File.Index) void { |
| 73 | if (!is_builtin) gpa.destroy(file); | 75 | if (!is_builtin) gpa.destroy(file); |
| 74 | } | 76 | } |
| 75 | | 77 | |
| | 78 | /// Ensures that `file` has up-to-date ZIR. If not, loads the ZIR cache or runs |
| | 79 | /// AstGen as needed. Also updates `file.status`. |
| 76 | pub fn updateFile( | 80 | pub fn updateFile( |
| 77 | pt: Zcu.PerThread, | 81 | pt: Zcu.PerThread, |
| 78 | file: *Zcu.File, | 82 | file: *Zcu.File, |
| ... | @@ -126,6 +130,24 @@ pub fn updateFile( | ... | @@ -126,6 +130,24 @@ pub fn updateFile( |
| 126 | }, | 130 | }, |
| 127 | }; | 131 | }; |
| 128 | | 132 | |
| | 133 | // The old compile error, if any, is no longer relevant. |
| | 134 | pt.lockAndClearFileCompileError(file); |
| | 135 | |
| | 136 | // If `zir` is not null, and `prev_zir` is null, then `TrackedInst`s are associated with `zir`. |
| | 137 | // We need to keep it around! |
| | 138 | // As an optimization, also check `loweringFailed`; if true, but `prev_zir == null`, then this |
| | 139 | // file has never passed AstGen, so we actually need not cache the old ZIR. |
| | 140 | if (file.zir != null and file.prev_zir == null and !file.zir.?.loweringFailed()) { |
| | 141 | assert(file.prev_zir == null); |
| | 142 | const prev_zir_ptr = try gpa.create(Zir); |
| | 143 | file.prev_zir = prev_zir_ptr; |
| | 144 | prev_zir_ptr.* = file.zir.?; |
| | 145 | file.zir = null; |
| | 146 | } |
| | 147 | |
| | 148 | // We're going to re-load everything, so unload source, AST, ZIR, ZOIR. |
| | 149 | file.unload(gpa); |
| | 150 | |
| 129 | // We ask for a lock in order to coordinate with other zig processes. | 151 | // We ask for a lock in order to coordinate with other zig processes. |
| 130 | // If another process is already working on this file, we will get the cached | 152 | // If another process is already working on this file, we will get the cached |
| 131 | // version. Likewise if we're working on AstGen and another process asks for | 153 | // version. Likewise if we're working on AstGen and another process asks for |
| ... | @@ -180,175 +202,164 @@ pub fn updateFile( | ... | @@ -180,175 +202,164 @@ pub fn updateFile( |
| 180 | }; | 202 | }; |
| 181 | defer cache_file.close(); | 203 | defer cache_file.close(); |
| 182 | | 204 | |
| 183 | while (true) { | 205 | const need_update = while (true) { |
| 184 | update: { | 206 | const result = switch (file.getMode()) { |
| 185 | // First we read the header to determine the lengths of arrays. | 207 | inline else => |mode| try loadZirZoirCache(zcu, cache_file, stat, file, mode), |
| 186 | const header = cache_file.reader().readStruct(Zir.Header) catch |err| switch (err) { | 208 | }; |
| 187 | // This can happen if Zig bails out of this function between creating | 209 | switch (result) { |
| 188 | // the cached file and writing it. | 210 | .success => { |
| 189 | error.EndOfStream => break :update, | 211 | log.debug("AstGen cached success: {s}", .{file.sub_file_path}); |
| 190 | else => |e| return e, | 212 | break false; |
| 191 | }; | 213 | }, |
| 192 | const unchanged_metadata = | 214 | .invalid => {}, |
| 193 | stat.size == header.stat_size and | 215 | .truncated => log.warn("unexpected EOF reading cached ZIR for {s}", .{file.sub_file_path}), |
| 194 | stat.mtime == header.stat_mtime and | 216 | .stale => log.debug("AstGen cache stale: {s}", .{file.sub_file_path}), |
| 195 | stat.inode == header.stat_inode; | | |
| 196 | | | |
| 197 | if (!unchanged_metadata) { | | |
| 198 | log.debug("AstGen cache stale: {s}", .{file.sub_file_path}); | | |
| 199 | break :update; | | |
| 200 | } | | |
| 201 | log.debug("AstGen cache hit: {s} instructions_len={d}", .{ | | |
| 202 | file.sub_file_path, header.instructions_len, | | |
| 203 | }); | | |
| 204 | | | |
| 205 | file.zir = Zcu.loadZirCacheBody(gpa, header, cache_file) catch |err| switch (err) { | | |
| 206 | error.UnexpectedFileSize => { | | |
| 207 | log.warn("unexpected EOF reading cached ZIR for {s}", .{file.sub_file_path}); | | |
| 208 | break :update; | | |
| 209 | }, | | |
| 210 | else => |e| return e, | | |
| 211 | }; | | |
| 212 | file.stat = .{ | | |
| 213 | .size = header.stat_size, | | |
| 214 | .inode = header.stat_inode, | | |
| 215 | .mtime = header.stat_mtime, | | |
| 216 | }; | | |
| 217 | file.status = .success; | | |
| 218 | log.debug("AstGen cached success: {s}", .{file.sub_file_path}); | | |
| 219 | | | |
| 220 | if (file.zir.?.hasCompileErrors()) { | | |
| 221 | comp.mutex.lock(); | | |
| 222 | defer comp.mutex.unlock(); | | |
| 223 | try zcu.failed_files.putNoClobber(gpa, file, null); | | |
| 224 | } | | |
| 225 | if (file.zir.?.loweringFailed()) { | | |
| 226 | file.status = .astgen_failure; | | |
| 227 | return error.AnalysisFail; | | |
| 228 | } | | |
| 229 | return; | | |
| 230 | } | 217 | } |
| 231 | | 218 | |
| 232 | // If we already have the exclusive lock then it is our job to update. | 219 | // If we already have the exclusive lock then it is our job to update. |
| 233 | if (builtin.os.tag == .wasi or lock == .exclusive) break; | 220 | if (builtin.os.tag == .wasi or lock == .exclusive) break true; |
| 234 | // Otherwise, unlock to give someone a chance to get the exclusive lock | 221 | // Otherwise, unlock to give someone a chance to get the exclusive lock |
| 235 | // and then upgrade to an exclusive lock. | 222 | // and then upgrade to an exclusive lock. |
| 236 | cache_file.unlock(); | 223 | cache_file.unlock(); |
| 237 | lock = .exclusive; | 224 | lock = .exclusive; |
| 238 | try cache_file.lock(lock); | 225 | try cache_file.lock(lock); |
| 239 | } | 226 | }; |
| 240 | | 227 | |
| 241 | // The cache is definitely stale so delete the contents to avoid an underwrite later. | 228 | if (need_update) { |
| 242 | cache_file.setEndPos(0) catch |err| switch (err) { | 229 | // The cache is definitely stale so delete the contents to avoid an underwrite later. |
| 243 | error.FileTooBig => unreachable, // 0 is not too big | 230 | cache_file.setEndPos(0) catch |err| switch (err) { |
| | 231 | error.FileTooBig => unreachable, // 0 is not too big |
| | 232 | else => |e| return e, |
| | 233 | }; |
| 244 | | 234 | |
| 245 | else => |e| return e, | 235 | if (stat.size > std.math.maxInt(u32)) |
| 246 | }; | 236 | return error.FileTooBig; |
| 247 | | 237 | |
| 248 | pt.lockAndClearFileCompileError(file); | 238 | const source = try gpa.allocSentinel(u8, @as(usize, @intCast(stat.size)), 0); |
| | 239 | defer if (file.source == null) gpa.free(source); |
| | 240 | const amt = try source_file.readAll(source); |
| | 241 | if (amt != stat.size) |
| | 242 | return error.UnexpectedEndOfFile; |
| 249 | | 243 | |
| 250 | // If `zir` is not null, and `prev_zir` is null, then `TrackedInst`s are associated with `zir`. | 244 | file.source = source; |
| 251 | // We need to keep it around! | 245 | |
| 252 | // As an optimization, also check `loweringFailed`; if true, but `prev_zir == null`, then this | 246 | // Any potential AST errors are converted to ZIR errors when we run AstGen/ZonGen. |
| 253 | // file has never passed AstGen, so we actually need not cache the old ZIR. | 247 | file.tree = try Ast.parse(gpa, source, file.getMode()); |
| 254 | if (file.zir != null and file.prev_zir == null and !file.zir.?.loweringFailed()) { | | |
| 255 | assert(file.prev_zir == null); | | |
| 256 | const prev_zir_ptr = try gpa.create(Zir); | | |
| 257 | file.prev_zir = prev_zir_ptr; | | |
| 258 | prev_zir_ptr.* = file.zir.?; | | |
| 259 | file.zir = null; | | |
| 260 | } | | |
| 261 | file.unload(gpa); | | |
| 262 | | 248 | |
| 263 | if (stat.size > std.math.maxInt(u32)) | 249 | switch (file.getMode()) { |
| 264 | return error.FileTooBig; | 250 | .zig => { |
| | 251 | file.zir = try AstGen.generate(gpa, file.tree.?); |
| | 252 | Zcu.saveZirCache(gpa, cache_file, stat, file.zir.?) catch |err| switch (err) { |
| | 253 | error.OutOfMemory => |e| return e, |
| | 254 | else => log.warn("unable to write cached ZIR code for {}{s} to {}{s}: {s}", .{ |
| | 255 | file.mod.root, file.sub_file_path, cache_directory, &hex_digest, @errorName(err), |
| | 256 | }), |
| | 257 | }; |
| | 258 | }, |
| | 259 | .zon => { |
| | 260 | file.zoir = try ZonGen.generate(gpa, file.tree.?, .{}); |
| | 261 | Zcu.saveZoirCache(cache_file, stat, file.zoir.?) catch |err| { |
| | 262 | log.warn("unable to write cached ZOIR code for {}{s} to {}{s}: {s}", .{ |
| | 263 | file.mod.root, file.sub_file_path, cache_directory, &hex_digest, @errorName(err), |
| | 264 | }); |
| | 265 | }; |
| | 266 | }, |
| | 267 | } |
| 265 | | 268 | |
| 266 | const source = try gpa.allocSentinel(u8, @as(usize, @intCast(stat.size)), 0); | 269 | log.debug("AstGen fresh success: {s}", .{file.sub_file_path}); |
| 267 | defer if (file.source == null) gpa.free(source); | 270 | } |
| 268 | const amt = try source_file.readAll(source); | | |
| 269 | if (amt != stat.size) | | |
| 270 | return error.UnexpectedEndOfFile; | | |
| 271 | | 271 | |
| 272 | file.stat = .{ | 272 | file.stat = .{ |
| 273 | .size = stat.size, | 273 | .size = stat.size, |
| 274 | .inode = stat.inode, | 274 | .inode = stat.inode, |
| 275 | .mtime = stat.mtime, | 275 | .mtime = stat.mtime, |
| 276 | }; | 276 | }; |
| 277 | file.source = source; | | |
| 278 | | 277 | |
| 279 | file.tree = try Ast.parse(gpa, source, .zig); | 278 | // Now, `zir` or `zoir` is definitely populated and up-to-date. |
| | 279 | // Mark file successes/failures as needed. |
| 280 | | 280 | |
| 281 | // Any potential AST errors are converted to ZIR errors here. | 281 | switch (file.getMode()) { |
| 282 | file.zir = try AstGen.generate(gpa, file.tree.?); | 282 | .zig => { |
| 283 | file.status = .success; | 283 | if (file.zir.?.hasCompileErrors()) { |
| 284 | log.debug("AstGen fresh success: {s}", .{file.sub_file_path}); | 284 | comp.mutex.lock(); |
| | 285 | defer comp.mutex.unlock(); |
| | 286 | try zcu.failed_files.putNoClobber(gpa, file, null); |
| | 287 | } |
| | 288 | if (file.zir.?.loweringFailed()) { |
| | 289 | file.status = .astgen_failure; |
| | 290 | } else { |
| | 291 | file.status = .success; |
| | 292 | } |
| | 293 | }, |
| | 294 | .zon => { |
| | 295 | if (file.zoir.?.hasCompileErrors()) { |
| | 296 | file.status = .astgen_failure; |
| | 297 | comp.mutex.lock(); |
| | 298 | defer comp.mutex.unlock(); |
| | 299 | try zcu.failed_files.putNoClobber(gpa, file, null); |
| | 300 | } else { |
| | 301 | file.status = .success; |
| | 302 | } |
| | 303 | }, |
| | 304 | } |
| 285 | | 305 | |
| 286 | const safety_buffer = if (Zcu.data_has_safety_tag) | 306 | switch (file.status) { |
| 287 | try gpa.alloc([8]u8, file.zir.?.instructions.len) | 307 | .never_loaded => unreachable, |
| 288 | else | 308 | .retryable_failure => unreachable, |
| 289 | undefined; | 309 | .astgen_failure => return error.AnalysisFail, |
| 290 | defer if (Zcu.data_has_safety_tag) gpa.free(safety_buffer); | 310 | .success => return, |
| 291 | const data_ptr = if (Zcu.data_has_safety_tag) | | |
| 292 | if (file.zir.?.instructions.len == 0) | | |
| 293 | @as([*]const u8, undefined) | | |
| 294 | else | | |
| 295 | @as([*]const u8, @ptrCast(safety_buffer.ptr)) | | |
| 296 | else | | |
| 297 | @as([*]const u8, @ptrCast(file.zir.?.instructions.items(.data).ptr)); | | |
| 298 | if (Zcu.data_has_safety_tag) { | | |
| 299 | // The `Data` union has a safety tag but in the file format we store it without. | | |
| 300 | for (file.zir.?.instructions.items(.data), 0..) |*data, i| { | | |
| 301 | const as_struct: *const Zcu.HackDataLayout = @ptrCast(data); | | |
| 302 | safety_buffer[i] = as_struct.data; | | |
| 303 | } | | |
| 304 | } | 311 | } |
| | 312 | } |
| 305 | | 313 | |
| 306 | const header: Zir.Header = .{ | 314 | fn loadZirZoirCache( |
| 307 | .instructions_len = @as(u32, @intCast(file.zir.?.instructions.len)), | 315 | zcu: *Zcu, |
| 308 | .string_bytes_len = @as(u32, @intCast(file.zir.?.string_bytes.len)), | 316 | cache_file: std.fs.File, |
| 309 | .extra_len = @as(u32, @intCast(file.zir.?.extra.len)), | 317 | stat: std.fs.File.Stat, |
| | 318 | file: *Zcu.File, |
| | 319 | comptime mode: Ast.Mode, |
| | 320 | ) !enum { success, invalid, truncated, stale } { |
| | 321 | assert(file.getMode() == mode); |
| 310 | | 322 | |
| 311 | .stat_size = stat.size, | 323 | const gpa = zcu.gpa; |
| 312 | .stat_inode = stat.inode, | 324 | |
| 313 | .stat_mtime = stat.mtime, | 325 | const Header = switch (mode) { |
| 314 | }; | 326 | .zig => Zir.Header, |
| 315 | var iovecs = [_]std.posix.iovec_const{ | 327 | .zon => Zoir.Header, |
| 316 | .{ | | |
| 317 | .base = @as([*]const u8, @ptrCast(&header)), | | |
| 318 | .len = @sizeOf(Zir.Header), | | |
| 319 | }, | | |
| 320 | .{ | | |
| 321 | .base = @as([*]const u8, @ptrCast(file.zir.?.instructions.items(.tag).ptr)), | | |
| 322 | .len = file.zir.?.instructions.len, | | |
| 323 | }, | | |
| 324 | .{ | | |
| 325 | .base = data_ptr, | | |
| 326 | .len = file.zir.?.instructions.len * 8, | | |
| 327 | }, | | |
| 328 | .{ | | |
| 329 | .base = file.zir.?.string_bytes.ptr, | | |
| 330 | .len = file.zir.?.string_bytes.len, | | |
| 331 | }, | | |
| 332 | .{ | | |
| 333 | .base = @as([*]const u8, @ptrCast(file.zir.?.extra.ptr)), | | |
| 334 | .len = file.zir.?.extra.len * 4, | | |
| 335 | }, | | |
| 336 | }; | 328 | }; |
| 337 | cache_file.writevAll(&iovecs) catch |err| { | 329 | |
| 338 | log.warn("unable to write cached ZIR code for {}{s} to {}{s}: {s}", .{ | 330 | // First we read the header to determine the lengths of arrays. |
| 339 | file.mod.root, file.sub_file_path, cache_directory, &hex_digest, @errorName(err), | 331 | const header = cache_file.reader().readStruct(Header) catch |err| switch (err) { |
| 340 | }); | 332 | // This can happen if Zig bails out of this function between creating |
| | 333 | // the cached file and writing it. |
| | 334 | error.EndOfStream => return .invalid, |
| | 335 | else => |e| return e, |
| 341 | }; | 336 | }; |
| 342 | | 337 | |
| 343 | if (file.zir.?.hasCompileErrors()) { | 338 | const unchanged_metadata = |
| 344 | comp.mutex.lock(); | 339 | stat.size == header.stat_size and |
| 345 | defer comp.mutex.unlock(); | 340 | stat.mtime == header.stat_mtime and |
| 346 | try zcu.failed_files.putNoClobber(gpa, file, null); | 341 | stat.inode == header.stat_inode; |
| | 342 | |
| | 343 | if (!unchanged_metadata) { |
| | 344 | return .stale; |
| 347 | } | 345 | } |
| 348 | if (file.zir.?.loweringFailed()) { | 346 | |
| 349 | file.status = .astgen_failure; | 347 | switch (mode) { |
| 350 | return error.AnalysisFail; | 348 | .zig => { |
| | 349 | file.zir = Zcu.loadZirCacheBody(gpa, header, cache_file) catch |err| switch (err) { |
| | 350 | error.UnexpectedFileSize => return .truncated, |
| | 351 | else => |e| return e, |
| | 352 | }; |
| | 353 | }, |
| | 354 | .zon => { |
| | 355 | file.zoir = Zcu.loadZoirCacheBody(gpa, header, cache_file) catch |err| switch (err) { |
| | 356 | error.UnexpectedFileSize => return .truncated, |
| | 357 | else => |e| return e, |
| | 358 | }; |
| | 359 | }, |
| 351 | } | 360 | } |
| | 361 | |
| | 362 | return .success; |
| 352 | } | 363 | } |
| 353 | | 364 | |
| 354 | const UpdatedFile = struct { | 365 | const UpdatedFile = struct { |
| ... | @@ -1819,7 +1830,6 @@ fn semaFile(pt: Zcu.PerThread, file_index: Zcu.File.Index) Zcu.SemaError!void { | ... | @@ -1819,7 +1830,6 @@ fn semaFile(pt: Zcu.PerThread, file_index: Zcu.File.Index) Zcu.SemaError!void { |
| 1819 | defer tracy.end(); | 1830 | defer tracy.end(); |
| 1820 | | 1831 | |
| 1821 | const zcu = pt.zcu; | 1832 | const zcu = pt.zcu; |
| 1822 | const gpa = zcu.gpa; | | |
| 1823 | const file = zcu.fileByIndex(file_index); | 1833 | const file = zcu.fileByIndex(file_index); |
| 1824 | assert(file.getMode() == .zig); | 1834 | assert(file.getMode() == .zig); |
| 1825 | assert(zcu.fileRootType(file_index) == .none); | 1835 | assert(zcu.fileRootType(file_index) == .none); |
| ... | @@ -1834,36 +1844,6 @@ fn semaFile(pt: Zcu.PerThread, file_index: Zcu.File.Index) Zcu.SemaError!void { | ... | @@ -1834,36 +1844,6 @@ fn semaFile(pt: Zcu.PerThread, file_index: Zcu.File.Index) Zcu.SemaError!void { |
| 1834 | }); | 1844 | }); |
| 1835 | const struct_ty = try pt.createFileRootStruct(file_index, new_namespace_index, false); | 1845 | const struct_ty = try pt.createFileRootStruct(file_index, new_namespace_index, false); |
| 1836 | errdefer zcu.intern_pool.remove(pt.tid, struct_ty); | 1846 | errdefer zcu.intern_pool.remove(pt.tid, struct_ty); |
| 1837 | | | |
| 1838 | switch (zcu.comp.cache_use) { | | |
| 1839 | .whole => |whole| if (whole.cache_manifest) |man| { | | |
| 1840 | const source = file.getSource(gpa) catch |err| { | | |
| 1841 | try pt.reportRetryableFileError(file_index, "unable to load source: {s}", .{@errorName(err)}); | | |
| 1842 | return error.AnalysisFail; | | |
| 1843 | }; | | |
| 1844 | | | |
| 1845 | const resolved_path = std.fs.path.resolve(gpa, &.{ | | |
| 1846 | file.mod.root.root_dir.path orelse ".", | | |
| 1847 | file.mod.root.sub_path, | | |
| 1848 | file.sub_file_path, | | |
| 1849 | }) catch |err| { | | |
| 1850 | try pt.reportRetryableFileError(file_index, "unable to resolve path: {s}", .{@errorName(err)}); | | |
| 1851 | return error.AnalysisFail; | | |
| 1852 | }; | | |
| 1853 | errdefer gpa.free(resolved_path); | | |
| 1854 | | | |
| 1855 | whole.cache_manifest_mutex.lock(); | | |
| 1856 | defer whole.cache_manifest_mutex.unlock(); | | |
| 1857 | man.addFilePostContents(resolved_path, source.bytes, source.stat) catch |err| switch (err) { | | |
| 1858 | error.OutOfMemory => |e| return e, | | |
| 1859 | else => { | | |
| 1860 | try pt.reportRetryableFileError(file_index, "unable to update cache: {s}", .{@errorName(err)}); | | |
| 1861 | return error.AnalysisFail; | | |
| 1862 | }, | | |
| 1863 | }; | | |
| 1864 | }, | | |
| 1865 | .incremental => {}, | | |
| 1866 | } | | |
| 1867 | } | 1847 | } |
| 1868 | | 1848 | |
| 1869 | pub fn importPkg(pt: Zcu.PerThread, mod: *Module) Allocator.Error!Zcu.ImportFileResult { | 1849 | pub fn importPkg(pt: Zcu.PerThread, mod: *Module) Allocator.Error!Zcu.ImportFileResult { |
| ... | @@ -2800,8 +2780,16 @@ pub fn getErrorValueFromSlice(pt: Zcu.PerThread, name: []const u8) Allocator.Err | ... | @@ -2800,8 +2780,16 @@ pub fn getErrorValueFromSlice(pt: Zcu.PerThread, name: []const u8) Allocator.Err |
| 2800 | /// Removes any entry from `Zcu.failed_files` associated with `file`. Acquires `Compilation.mutex` as needed. | 2780 | /// Removes any entry from `Zcu.failed_files` associated with `file`. Acquires `Compilation.mutex` as needed. |
| 2801 | /// `file.zir` must be unchanged from the last update, as it is used to determine if there is such an entry. | 2781 | /// `file.zir` must be unchanged from the last update, as it is used to determine if there is such an entry. |
| 2802 | fn lockAndClearFileCompileError(pt: Zcu.PerThread, file: *Zcu.File) void { | 2782 | fn lockAndClearFileCompileError(pt: Zcu.PerThread, file: *Zcu.File) void { |
| 2803 | const zir = file.zir orelse return; | 2783 | switch (file.getMode()) { |
| 2804 | if (!zir.hasCompileErrors()) return; | 2784 | .zig => { |
| | 2785 | const zir = file.zir orelse return; |
| | 2786 | if (!zir.hasCompileErrors()) return; |
| | 2787 | }, |
| | 2788 | .zon => { |
| | 2789 | const zoir = file.zoir orelse return; |
| | 2790 | if (!zoir.hasCompileErrors()) return; |
| | 2791 | }, |
| | 2792 | } |
| 2805 | | 2793 | |
| 2806 | pt.zcu.comp.mutex.lock(); | 2794 | pt.zcu.comp.mutex.lock(); |
| 2807 | defer pt.zcu.comp.mutex.unlock(); | 2795 | defer pt.zcu.comp.mutex.unlock(); |