@ai-ecoverse/slicc-kernel 1.53.1 → 1.53.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.
package/dist/process-worker.js
CHANGED
|
@@ -6746,7 +6746,14 @@ var init_wasi_imports = __esm({
|
|
|
6746
6746
|
});
|
|
6747
6747
|
|
|
6748
6748
|
// src/process/wasi/wasi-module.ts
|
|
6749
|
-
|
|
6749
|
+
function libcVersion(module) {
|
|
6750
|
+
for (const section2 of WebAssembly.Module.customSections(module, "slicc.libc")) {
|
|
6751
|
+
const found = LIBC_MARK.exec(new TextDecoder().decode(section2));
|
|
6752
|
+
if (found) return Number(found[1]);
|
|
6753
|
+
}
|
|
6754
|
+
return void 0;
|
|
6755
|
+
}
|
|
6756
|
+
var RESERVED_NAMESPACES, LIBC_MARK;
|
|
6750
6757
|
var init_wasi_module = __esm({
|
|
6751
6758
|
"src/process/wasi/wasi-module.ts"() {
|
|
6752
6759
|
"use strict";
|
|
@@ -6756,6 +6763,7 @@ var init_wasi_module = __esm({
|
|
|
6756
6763
|
"wasi",
|
|
6757
6764
|
"env"
|
|
6758
6765
|
]);
|
|
6766
|
+
LIBC_MARK = /^wasix-sysroot \d{4}\.\d+\.\d+-(\d+)/;
|
|
6759
6767
|
}
|
|
6760
6768
|
});
|
|
6761
6769
|
|
|
@@ -8381,13 +8389,14 @@ function posixSignal(sig) {
|
|
|
8381
8389
|
function nsToMs(ns) {
|
|
8382
8390
|
return Math.ceil(Number(ns) / 1e6);
|
|
8383
8391
|
}
|
|
8384
|
-
var FDFLAGSEXT_CLOEXEC, SPAWN_OP_SIZE, SPAWN_OPS, RIGHTS_FD_WRITE, ICANON, ECHO, FUTEX_SLICE_MS, MAIN_HANDLE, WasixHost;
|
|
8392
|
+
var FDFLAGSEXT_CLOEXEC, SPAWN_OP_SIZE, SPAWN_OPS, RIGHTS_FD_WRITE, ICANON, ECHO, FUTEX_SLICE_MS, EINTR_LIBC, MAIN_HANDLE, WasixHost;
|
|
8385
8393
|
var init_wasix_host = __esm({
|
|
8386
8394
|
"src/process/wasi/wasix-host.ts"() {
|
|
8387
8395
|
"use strict";
|
|
8388
8396
|
init_wasi_abi();
|
|
8389
8397
|
init_wasi_files();
|
|
8390
8398
|
init_wasi_host();
|
|
8399
|
+
init_wasi_module();
|
|
8391
8400
|
init_wasi_threads();
|
|
8392
8401
|
init_wasix_ffi();
|
|
8393
8402
|
init_wasix_linker();
|
|
@@ -8402,6 +8411,7 @@ var init_wasix_host = __esm({
|
|
|
8402
8411
|
ICANON = 2;
|
|
8403
8412
|
ECHO = 8;
|
|
8404
8413
|
FUTEX_SLICE_MS = 50;
|
|
8414
|
+
EINTR_LIBC = 22;
|
|
8405
8415
|
MAIN_HANDLE = 2147483647;
|
|
8406
8416
|
WasixHost = class _WasixHost {
|
|
8407
8417
|
process;
|
|
@@ -8422,7 +8432,7 @@ var init_wasix_host = __esm({
|
|
|
8422
8432
|
);
|
|
8423
8433
|
if (module && !WebAssembly.Module.imports(module).some((i) => i.name === "fd_fdflags_set")) {
|
|
8424
8434
|
host.fds.implicitCloexec = true;
|
|
8425
|
-
host.interruptWakes =
|
|
8435
|
+
host.interruptWakes = (libcVersion(module) ?? 0) < EINTR_LIBC;
|
|
8426
8436
|
}
|
|
8427
8437
|
}
|
|
8428
8438
|
get mem() {
|