abla/runtime/platform/host_os
Generated from source.
Source module; follow its importing module's re-export links.
Source: abla/runtime/platform/host_os.ab
__ablaRuntimeFutexWait (fun)
trusted fun __ablaRuntimeFutexWait(address: int, expected: int): void
futex(2) on the low 32 bits of an 8-byte word, private to the process: FUTEX_WAIT_PRIVATE sleeps while the word still holds expected, and FUTEX_WAKE_PRIVATE wakes up to count sleepers. An early return (EAGAIN, EINTR) is fine: every caller looks at the word again.
__ablaRuntimeFutexWake (fun)
trusted fun __ablaRuntimeFutexWake(address: int, count: int): void
Wakes up to count waiters on the private futex and discards the syscall status.
__ablaRuntimeOsMap (fun)
trusted fun __ablaRuntimeOsMap(bytes: int): int
Anonymous zeroed read-write pages: the address, or a negative errno.
__ablaRuntimeOsUnmap (fun)
trusted fun __ablaRuntimeOsUnmap(address: int, bytes: int): void
Unmaps the range and discards the syscall status.
__ablaRuntimeOsRemap (fun)
trusted fun __ablaRuntimeOsRemap(base: int, before: int, after: int): int
A mapping resized in place or moved (MREMAP_MAYMOVE): the new base, or a negative errno. Not on macOS, which has no mremap.
__ablaRuntimeOsReserveWindow (fun)
trusted fun __ablaRuntimeOsReserveWindow(span: int): int
The frozen groups' window (docs/design/frozen-heap.md):
- ReserveWindow:
spanbytes of address space, no access, not backed (MAP_NORESERVE), or a negative errno; - ReserveFixed: the range [address, address + length) made again that reserved, unbacked space (MAP_FIXED over it);
- Protect: pages made read-write (writable) or read-only.
__ablaRuntimeOsReserveFixed (fun)
trusted fun __ablaRuntimeOsReserveFixed(address: int, length: int): void
Replaces the range with an inaccessible reservation at the same address and discards the syscall status.
__ablaRuntimeOsProtect (fun)
trusted fun __ablaRuntimeOsProtect(address: int, length: int, writable: bool): void
Requests read-only or read-write protection for the pages and discards the syscall status.
__ablaRuntimeOsDiscard (fun)
trusted fun __ablaRuntimeOsDiscard(address: int, length: int): void
The pages of [address, address + length) given back to the system (MADV_DONTNEED): the range is already whole pages.
__ablaRuntimeOsWipeOnFork (fun)
trusted fun __ablaRuntimeOsWipeOnFork(page: int): void
One page that is zero in a forked child (MADV_WIPEONFORK), the child's way to learn the heap lock's holder did not survive.
__ablaRuntimeOsMonotonicTime (fun)
trusted fun __ablaRuntimeOsMonotonicTime(scratch: int): void
The monotonic clock in the 16 bytes at scratch: seconds, then nanoseconds.
__ablaRuntimeOsSleep (fun)
trusted fun __ablaRuntimeOsSleep(scratch: int): void
A sleep of the 16 bytes at scratch (seconds, nanoseconds).
__ablaRuntimeOsCpuAffinity (fun)
trusted fun __ablaRuntimeOsCpuAffinity(mask: int, size: int): int
The CPUs this process may run on, as a bit mask written to the size bytes at mask: the bytes written, or a negative errno.
__ablaRuntimeOsProcessId (fun)
trusted fun __ablaRuntimeOsProcessId(): int
The calling process's id (a forked child has its own).
__ablaRuntimeOsThreadId (fun)
trusted fun __ablaRuntimeOsThreadId(): int
The calling thread's kernel id (x86-64 and AArch64 Linux); 0 elsewhere, where a thread's state cannot be read.
__ablaRuntimeOsOpenRead (fun)
trusted fun __ablaRuntimeOsOpenRead(path: int): int
The NUL-ended path at path opened read-only: a descriptor, or a negative errno.
__ablaRuntimeOsRead (fun)
trusted fun __ablaRuntimeOsRead(descriptor: int, buffer: int, count: int): int
Reads up to count bytes into the buffer and returns the byte count, zero at EOF, or a negative errno.
__ablaRuntimeOsClose (fun)
trusted fun __ablaRuntimeOsClose(descriptor: int): void
Closes the descriptor and discards the syscall status.
__ablaRuntimeOsSignalStackCall (fun)
trusted fun __ablaRuntimeOsSignalStackCall(installed: int, previous: int): bool
sigaltstack(installed, previous): true when it succeeded. 131 on x86-64 Linux (and in an AArch64 build whose system calls are translated), 132 on AArch64, 53 on Darwin, whose stack_t has its flags after the size (and SS_DISABLE 4, not 2).
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.