@ai-ecoverse/slicc-kernel 1.100.2 → 1.100.3

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.
@@ -4767,7 +4767,7 @@ var KERNEL_VERSION, OS_RELEASE;
4767
4767
  var init_version = __esm({
4768
4768
  "src/version.ts"() {
4769
4769
  "use strict";
4770
- KERNEL_VERSION = true ? "1.100.2" : "0.0.0-dev";
4770
+ KERNEL_VERSION = true ? "1.100.3" : "0.0.0-dev";
4771
4771
  OS_RELEASE = "6.0.0-slicc";
4772
4772
  }
4773
4773
  });
package/dist/node.js CHANGED
@@ -11107,7 +11107,7 @@ var PATH_OPS = new Set(SYNC_FS_OPS);
11107
11107
  var EARLY_WHOLE_FILE = 64 * 1024;
11108
11108
 
11109
11109
  // src/version.ts
11110
- var KERNEL_VERSION = true ? "1.100.2" : "0.0.0-dev";
11110
+ var KERNEL_VERSION = true ? "1.100.3" : "0.0.0-dev";
11111
11111
  var OS_RELEASE = "6.0.0-slicc";
11112
11112
  function procVersion() {
11113
11113
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -15464,6 +15464,10 @@ function identityKey(st, path) {
15464
15464
  }
15465
15465
  var DYING = { ok: false, errno: "EINTR", message: "the process is being killed" };
15466
15466
  var HOSTS_ONLY = new Resolver({ routes: new Routes() });
15467
+ function timeLeft2(req, started) {
15468
+ if (!("timeoutMs" in req) || typeof req.timeoutMs !== "number" || req.timeoutMs < 0) return req;
15469
+ return { ...req, timeoutMs: Math.max(0, req.timeoutMs - (performance.now() - started)) };
15470
+ }
15467
15471
  var WasmProcess = class {
15468
15472
  exited = false;
15469
15473
  children;
@@ -15624,22 +15628,28 @@ var WasmProcess = class {
15624
15628
  blocks = /* @__PURE__ */ new WeakMap();
15625
15629
  async syscall(req, cancelled, block) {
15626
15630
  this.options.onSyscall?.(req);
15631
+ const started = performance.now();
15632
+ let restarted = false;
15627
15633
  for (; ; ) {
15628
15634
  await this.resumed;
15629
15635
  if (this.dying) return DYING;
15636
+ const current = restarted ? timeLeft2(req, started) : req;
15630
15637
  const stops = this.stops;
15631
15638
  const scope = new AbortController();
15632
15639
  const forward = () => scope.abort();
15633
15640
  if (cancelled?.aborted) scope.abort();
15634
15641
  cancelled?.addEventListener("abort", forward, { once: true });
15635
15642
  if (block) this.blocks.set(scope.signal, block);
15636
- const result = await this.dispatch(req, scope.signal).finally(() => {
15643
+ const result = await this.dispatch(current, scope.signal).finally(() => {
15637
15644
  cancelled?.removeEventListener("abort", forward);
15638
15645
  this.waiting.delete(scope.signal);
15639
15646
  });
15640
15647
  if (this.dying) return DYING;
15641
15648
  const restart = !result.ok && result.errno === "EINTR" && this.stops !== stops;
15642
- if (restart && !this.options.hasPending?.()) continue;
15649
+ if (restart && !this.options.hasPending?.() && req.op !== "epoll-wait") {
15650
+ restarted = true;
15651
+ continue;
15652
+ }
15643
15653
  await this.resumed;
15644
15654
  return result;
15645
15655
  }