platform
Platform Detection and System Information
Functions
| Function | Description |
|---|---|
_platform_uname | Internal: uname syscall wrapper (syscall 63). struct utsname: 5 fields of 65 … |
_plat_byte_at | Internal byte reader helper. |
_plat_copy_field | Internal: copy string from utsname field to output. |
_plat_copy_lit | Internal: copy literal bytes. |
platform_system | Get OS name. Returns length written. |
platform_release | Get kernel release string. Returns length written. |
platform_machine | Get machine architecture. Returns length written. |
platform_node | Get hostname. Returns length written. |
platform_info | Get combined platform info: “Linux x86_64 |
platform_is_x86_64 | Check if platform is x86_64. Always returns 1 (Jda only targets x86-64). |
platform_page_size | Get system page size. Always 4096 on Linux x86-64. |
Details
_platform_uname
fn _platform_uname(buf: &i8) -> i64Internal: uname syscall wrapper (syscall 63). struct utsname: 5 fields of 65 bytes each = 325 bytes total. [0..64] = sysname, [65..129] = nodename, [130..194] = release, [195..259] = version, [260..324] = machine
_plat_byte_at
fn _plat_byte_at(buf: &i8, idx: i64) -> i64Internal byte reader helper.
_plat_copy_field
fn _plat_copy_field(dst: &i8, src: &i8, offset: i64, max: i64) -> i64Internal: copy string from utsname field to output.
_plat_copy_lit
fn _plat_copy_lit(dst: &i8, doff: i64, src: &i8, len: i64) -> i64Internal: copy literal bytes.
platform_system
fn platform_system(out: &i8, max: i64) -> i64Get OS name. Returns length written.
platform_release
fn platform_release(out: &i8, max: i64) -> i64Get kernel release string. Returns length written.
platform_machine
fn platform_machine(out: &i8, max: i64) -> i64Get machine architecture. Returns length written.
platform_node
fn platform_node(out: &i8, max: i64) -> i64Get hostname. Returns length written.
platform_info
fn platform_info(out: &i8, max: i64) -> i64Get combined platform info: “Linux x86_64
platform_is_x86_64
fn platform_is_x86_64() -> i64Check if platform is x86_64. Always returns 1 (Jda only targets x86-64).
platform_page_size
fn platform_page_size() -> i64Get system page size. Always 4096 on Linux x86-64.