@ai-ecoverse/slicc-kernel 1.102.3 → 1.102.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/kernel-worker.js +73 -7
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +8 -4
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +73 -7
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +8 -4
- package/dist/process-worker.js.map +2 -2
- package/package.json +1 -1
package/dist/process-worker.js
CHANGED
|
@@ -1018,7 +1018,7 @@ function normal(path) {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
return `/${parts.join("/")}`;
|
|
1020
1020
|
}
|
|
1021
|
-
var GEN, RING, RING_SIZE, SLOT, CHANGES_BYTES, ChangeView;
|
|
1021
|
+
var GEN, RING, RING_SIZE, SLOT, DIRTY, CHANGES_BYTES, ChangeView;
|
|
1022
1022
|
var init_changes = __esm({
|
|
1023
1023
|
"src/fs/changes.ts"() {
|
|
1024
1024
|
"use strict";
|
|
@@ -1026,7 +1026,8 @@ var init_changes = __esm({
|
|
|
1026
1026
|
RING = 1;
|
|
1027
1027
|
RING_SIZE = 4096;
|
|
1028
1028
|
SLOT = 2;
|
|
1029
|
-
|
|
1029
|
+
DIRTY = RING + RING_SIZE * SLOT;
|
|
1030
|
+
CHANGES_BYTES = (DIRTY + 1) * 4;
|
|
1030
1031
|
ChangeView = class {
|
|
1031
1032
|
view;
|
|
1032
1033
|
constructor(sab) {
|
|
@@ -1035,6 +1036,9 @@ var init_changes = __esm({
|
|
|
1035
1036
|
now() {
|
|
1036
1037
|
return Atomics.load(this.view, GEN);
|
|
1037
1038
|
}
|
|
1039
|
+
clean() {
|
|
1040
|
+
return this.view.length > DIRTY && Atomics.load(this.view, DIRTY) === 0;
|
|
1041
|
+
}
|
|
1038
1042
|
changedSince(seen, path) {
|
|
1039
1043
|
const now = Atomics.load(this.view, GEN);
|
|
1040
1044
|
const distance = now - seen >>> 0;
|
|
@@ -2480,7 +2484,7 @@ var KERNEL_VERSION, OS_RELEASE;
|
|
|
2480
2484
|
var init_version = __esm({
|
|
2481
2485
|
"src/version.ts"() {
|
|
2482
2486
|
"use strict";
|
|
2483
|
-
KERNEL_VERSION = true ? "1.102.
|
|
2487
|
+
KERNEL_VERSION = true ? "1.102.5" : "0.0.0-dev";
|
|
2484
2488
|
OS_RELEASE = "6.0.0-slicc";
|
|
2485
2489
|
}
|
|
2486
2490
|
});
|
|
@@ -7398,7 +7402,7 @@ var init_wasi_fds = __esm({
|
|
|
7398
7402
|
}
|
|
7399
7403
|
flushPath(path) {
|
|
7400
7404
|
for (const [p, buffer] of this.buffers) if (within(p, path)) buffer.flush();
|
|
7401
|
-
if (this.shared) this.kernel.call({ op: "fd-path-flush", path });
|
|
7405
|
+
if (this.shared && !this.fs.changes?.clean()) this.kernel.call({ op: "fd-path-flush", path });
|
|
7402
7406
|
}
|
|
7403
7407
|
holdsUnder(path) {
|
|
7404
7408
|
for (const p of this.buffers.keys()) if (within(p, path)) return true;
|