ableos_userland/libraries/os_core/src/lib.rs

27 lines
505 B
Rust
Raw Normal View History

2023-04-07 16:42:28 -05:00
#![no_std]
type Handle = i64;
#[repr(C)]
pub struct OSString {
pub address: i32,
pub length: i32,
}
extern "C" {
pub fn create_object(string: OSString) -> Result<Handle>;
pub fn read_object_attribute(handle: Handle, string: OSString) -> Result<OSString>;
pub fn set_object_attribute(handle: Handle, string: OSString, value: OSString) -> Result<()>;
}
#[repr(C)]
pub enum ExternErrors {
None = 0,
}
#[repr(C)]
pub struct Result<T> {
pub ok: T,
pub err: ExternErrors,
}