MCPcopy Create free account
hub / github.com/WebAssembly/wabt / wasm_rt_syscall_get_segue_base

Function wasm_rt_syscall_get_segue_base

wasm2c/wasm-rt-impl.c:342–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340 }
341}
342void* wasm_rt_syscall_get_segue_base() {
343 void* base;
344 int error_code = 0;
345#ifdef __linux__
346 error_code = syscall(SYS_arch_prctl, ARCH_GET_GS, &base);
347#elif defined(__FreeBSD__)
348 error_code = amd64_get_gsbase(&base);
349#else
350#error "Unknown platform"
351#endif
352 if (error_code != 0) {
353 perror("wasm_rt_syscall_get_segue_base error");
354 abort();
355 }
356 return base;
357}
358#endif
359
360// Include table operations for funcref

Callers 2

wasm_rt_segue_read_baseFunction · 0.85
wasm_rt_segue_read_baseFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected