@ai-ecoverse/slicc-kernel 1.102.5 → 1.102.6

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.
@@ -4774,7 +4774,7 @@ var KERNEL_VERSION, OS_RELEASE;
4774
4774
  var init_version = __esm({
4775
4775
  "src/version.ts"() {
4776
4776
  "use strict";
4777
- KERNEL_VERSION = true ? "1.102.5" : "0.0.0-dev";
4777
+ KERNEL_VERSION = true ? "1.102.6" : "0.0.0-dev";
4778
4778
  OS_RELEASE = "6.0.0-slicc";
4779
4779
  }
4780
4780
  });
package/dist/node.js CHANGED
@@ -11177,7 +11177,7 @@ var PATH_OPS = new Set(SYNC_FS_OPS);
11177
11177
  var EARLY_WHOLE_FILE = 64 * 1024;
11178
11178
 
11179
11179
  // src/version.ts
11180
- var KERNEL_VERSION = true ? "1.102.5" : "0.0.0-dev";
11180
+ var KERNEL_VERSION = true ? "1.102.6" : "0.0.0-dev";
11181
11181
  var OS_RELEASE = "6.0.0-slicc";
11182
11182
  function procVersion() {
11183
11183
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -15653,8 +15653,15 @@ var WasmProcess = class {
15653
15653
  const bit = sigbit(sig);
15654
15654
  if (this.ignores(bit)) return "ignore";
15655
15655
  if (((this.options.blockedBits?.() ?? 0) & bit) !== 0) {
15656
- this.options.onPending?.(sig);
15657
- return "deliver";
15656
+ const tid = this.options.unblockedThread?.(sig);
15657
+ if (tid === void 0) {
15658
+ this.options.onPending?.(sig);
15659
+ return "deliver";
15660
+ }
15661
+ if (this.caught & bit) {
15662
+ this.options.threadKill?.(tid, sig);
15663
+ return "deliver";
15664
+ }
15658
15665
  }
15659
15666
  if (!(this.caught & bit)) {
15660
15667
  const action = defaultAction(sig);
@@ -16897,6 +16904,12 @@ function killThread(thread, caught, sig) {
16897
16904
  blocked2.abort();
16898
16905
  return true;
16899
16906
  }
16907
+ function unblockedThread(threads, sig) {
16908
+ for (const [tid, thread] of threads) {
16909
+ if ((Atomics.load(thread.header, SAB_I_BLOCKED) & sigbit(sig)) === 0) return tid;
16910
+ }
16911
+ return void 0;
16912
+ }
16900
16913
  function unblocked(header4) {
16901
16914
  return Atomics.load(header4, SAB_I_SIGNALS) & ~Atomics.load(header4, SAB_I_BLOCKED);
16902
16915
  }
@@ -17047,6 +17060,7 @@ function processOptions(opts, header4, hooks, created3) {
17047
17060
  hasPending: () => unblocked(header4) !== 0 || Atomics.load(header4, SAB_I_TIMERS) !== 0,
17048
17061
  raise: hooks.raise,
17049
17062
  threadKill: hooks.threadKill,
17063
+ unblockedThread: hooks.unblockedThread,
17050
17064
  ...hooks.exitNow ? { exitNow: hooks.exitNow } : {},
17051
17065
  ...hooks.exitSignal ? { exitSignal: hooks.exitSignal } : {},
17052
17066
  ...opts.program.abi === "wasi" || opts.program.abi === "js" ? { pendingBits: () => Atomics.load(header4, SAB_I_SIGNALS) } : {},
@@ -17087,6 +17101,7 @@ function spawnWasmProcess(opts) {
17087
17101
  {
17088
17102
  raise: (sig) => signal(sig),
17089
17103
  threadKill: (tid, sig) => killThread(threadSignals.get(tid), process2.signalMasks().caught, sig),
17104
+ unblockedThread: (sig) => unblockedThread(threadSignals, sig),
17090
17105
  ...opts.program.abi === "js" ? {
17091
17106
  exitNow: (code) => exitNow(code),
17092
17107
  exitSignal: (sig) => queueMicrotask(() => finish(128 + sig, sig))