package core:sys/haiku

Warning: This was generated for -target:haiku_arm64 and might not represet every target this package supports.

⌘K
Ctrl+K
or
/

    Index

    Variables (0)

    This section is empty.

    Procedures (82)
    Procedure Groups (0)

    This section is empty.

    Types

    Errno ¶

    Errno :: enum i32 {
    	// Error baselines
    	GENERAL_ERROR_BASE                = -2147843648, 
    	OS_ERROR_BASE                     = -2147749552, 
    	APP_ERROR_BASE                    = -2147745456, 
    	INTERFACE_ERROR_BASE              = -2147741360, 
    	MEDIA_ERROR_BASE                  = -2147647264, 
    	TRANSLATION_ERROR_BASE            = -2147645216, 
    	MIDI_ERROR_BASE                   = -2147643168, 
    	STORAGE_ERROR_BASE                = -2147549072, 
    	POSIX_ERROR_BASE                  = -2147544976, 
    	MAIL_ERROR_BASE                   = -2147540880, 
    	PRINT_ERROR_BASE                  = -2147446784, 
    	DEVICE_ERROR_BASE                 = -2147442688, 
    	// Developer-defined errors start at (ERRORS_END+1)
    	ERRORS_END                        = -2147148113, 
    	// General Errors
    	NO_MEMORY                         = -2147843648, 
    	IO_ERROR                          = -2147843647, 
    	PERMISSION_DENIED                 = -2147843646, 
    	BAD_INDEX                         = -2147843645, 
    	BAD_TYPE                          = -2147843644, 
    	BAD_VALUE                         = -2147843643, 
    	MISMATCHED_VALUES                 = -2147843642, 
    	NAME_NOT_FOUND                    = -2147843641, 
    	NAME_IN_USE                       = -2147843640, 
    	TIMED_OUT                         = -2147843639, 
    	INTERRUPTED                       = -2147843638, 
    	WOULD_BLOCK                       = -2147843637, 
    	CANCELED                          = -2147843636, 
    	NO_INIT                           = -2147843635, 
    	NOT_INITIALIZED                   = -2147843635, 
    	BUSY                              = -2147843634, 
    	NOT_ALLOWED                       = -2147843633, 
    	BAD_DATA                          = -2147843632, 
    	DONT_DO_THAT                      = -2147843631, 
    	ERROR                             = -1, 
    	OK                                = 0, 
    	NO_ERROR                          = 0, 
    	// Kernel Kit Errors
    	BAD_SEM_ID                        = -2147749552, 
    	NO_MORE_SEMS                      = -2147749551, 
    	BAD_THREAD_ID                     = -2147749296, 
    	NO_MORE_THREADS                   = -2147749295, 
    	BAD_THREAD_STATE                  = -2147749294, 
    	BAD_TEAM_ID                       = -2147749293, 
    	NO_MORE_TEAMS                     = -2147749292, 
    	BAD_PORT_ID                       = -2147749040, 
    	NO_MORE_PORTS                     = -2147749039, 
    	BAD_IMAGE_ID                      = -2147748784, 
    	BAD_ADDRESS                       = -2147748783, 
    	NOT_AN_EXECUTABLE                 = -2147748782, 
    	MISSING_LIBRARY                   = -2147748781, 
    	MISSING_SYMBOL                    = -2147748780, 
    	UNKNOWN_EXECUTABLE                = -2147748779, 
    	LEGACY_EXECUTABLE                 = -2147748778, 
    	DEBUGGER_ALREADY_INSTALLED        = -2147748528, 
    	// Application Kit Errors
    	BAD_REPLY                         = -2147745456, 
    	DUPLICATE_REPLY                   = -2147745455, 
    	MESSAGE_TO_SELF                   = -2147745454, 
    	BAD_HANDLER                       = -2147745453, 
    	ALREADY_RUNNING                   = -2147745452, 
    	LAUNCH_FAILED                     = -2147745451, 
    	AMBIGUOUS_APP_LAUNCH              = -2147745450, 
    	UNKNOWN_MIME_TYPE                 = -2147745449, 
    	BAD_SCRIPT_SYNTAX                 = -2147745448, 
    	LAUNCH_FAILED_NO_RESOLVE_LINK     = -2147745447, 
    	LAUNCH_FAILED_EXECUTABLE          = -2147745446, 
    	LAUNCH_FAILED_APP_NOT_FOUND       = -2147745445, 
    	LAUNCH_FAILED_APP_IN_TRASH        = -2147745444, 
    	LAUNCH_FAILED_NO_PREFERRED_APP    = -2147745443, 
    	LAUNCH_FAILED_FILES_APP_NOT_FOUND = -2147745442, 
    	BAD_MIME_SNIFFER_RULE             = -2147745441, 
    	NOT_A_MESSAGE                     = -2147745440, 
    	SHUTDOWN_CANCELLED                = -2147745439, 
    	SHUTTING_DOWN                     = -2147745438, 
    	// Storage Kit/File System Errors
    	FILE_ERROR                        = -2147549072, 
    	// 1 was B_FILE_NOT_FOUND (deprecated)
    	FILE_EXISTS                       = -2147549070, 
    	ENTRY_NOT_FOUND                   = -2147549069, 
    	NAME_TOO_LONG                     = -2147549068, 
    	NOT_A_DIRECTORY                   = -2147549067, 
    	DIRECTORY_NOT_EMPTY               = -2147549066, 
    	DEVICE_FULL                       = -2147549065, 
    	READ_ONLY_DEVICE                  = -2147549064, 
    	IS_A_DIRECTORY                    = -2147549063, 
    	NO_MORE_FDS                       = -2147549062, 
    	CROSS_DEVICE_LINK                 = -2147549061, 
    	LINK_LIMIT                        = -2147549060, 
    	BUSTED_PIPE                       = -2147549059, 
    	UNSUPPORTED                       = -2147549058, 
    	PARTITION_TOO_SMALL               = -2147549057, 
    	PARTIAL_READ                      = -2147549056, 
    	PARTIAL_WRITE                     = -2147549055, 
    	// Some POSIX errors
    	E2BIG                             = -2147544975, 
    	EFBIG                             = -2147544972, 
    	ENODEV                            = -2147544969, 
    	ERANGE                            = -2147544959, 
    	EOVERFLOW                         = -2147544935, 
    	EOPNOTSUPP                        = -2147544933, 
    	ENOSYS                            = -2147544967, 
    	EAGAIN                            = -2147843637, 
    	// New error codes that can be mapped to POSIX errors
    	TOO_MANY_ARGS_NEG                 = -2147544975, 
    	FILE_TOO_LARGE_NEG                = -2147544972, 
    	DEVICE_NOT_FOUND_NEG              = -2147544969, 
    	RESULT_NOT_REPRESENTABLE_NEG      = -2147544959, 
    	BUFFER_OVERFLOW_NEG               = -2147544935, 
    	NOT_SUPPORTED_NEG                 = -2147544933, 
    	TOO_MANY_ARGS_POS                 = 2147454975, 
    	FILE_TOO_LARGE_POS                = 2147454972, 
    	DEVICE_NOT_FOUND_POS              = 2147454969, 
    	RESULT_NOT_REPRESENTABLE_POS      = 2147454959, 
    	BUFFER_OVERFLOW_POS               = 2147454935, 
    	NOT_SUPPORTED_POS                 = 2147454933, 
    	// Media Kit Errors
    	STREAM_NOT_FOUND                  = -2147647264, 
    	SERVER_NOT_FOUND                  = -2147647263, 
    	RESOURCE_NOT_FOUND                = -2147647262, 
    	RESOURCE_UNAVAILABLE              = -2147647261, 
    	BAD_SUBSCRIBER                    = -2147647260, 
    	SUBSCRIBER_NOT_ENTERED            = -2147647259, 
    	BUFFER_NOT_AVAILABLE              = -2147647258, 
    	LAST_BUFFER_ERROR                 = -2147647257, 
    	MEDIA_SYSTEM_FAILURE              = -2147647164, 
    	MEDIA_BAD_NODE                    = -2147647163, 
    	MEDIA_NODE_BUSY                   = -2147647162, 
    	MEDIA_BAD_FORMAT                  = -2147647161, 
    	MEDIA_BAD_BUFFER                  = -2147647160, 
    	MEDIA_TOO_MANY_NODES              = -2147647159, 
    	MEDIA_TOO_MANY_BUFFERS            = -2147647158, 
    	MEDIA_NODE_ALREADY_EXISTS         = -2147647157, 
    	MEDIA_BUFFER_ALREADY_EXISTS       = -2147647156, 
    	MEDIA_CANNOT_SEEK                 = -2147647155, 
    	MEDIA_CANNOT_CHANGE_RUN_MODE      = -2147647154, 
    	MEDIA_APP_ALREADY_REGISTERED      = -2147647153, 
    	MEDIA_APP_NOT_REGISTERED          = -2147647152, 
    	MEDIA_CANNOT_RECLAIM_BUFFERS      = -2147647151, 
    	MEDIA_BUFFERS_NOT_RECLAIMED       = -2147647150, 
    	MEDIA_TIME_SOURCE_STOPPED         = -2147647149, 
    	MEDIA_TIME_SOURCE_BUSY            = -2147647148, 
    	MEDIA_BAD_SOURCE                  = -2147647147, 
    	MEDIA_BAD_DESTINATION             = -2147647146, 
    	MEDIA_ALREADY_CONNECTED           = -2147647145, 
    	MEDIA_NOT_CONNECTED               = -2147647144, 
    	MEDIA_BAD_CLIP_FORMAT             = -2147647143, 
    	MEDIA_ADDON_FAILED                = -2147647142, 
    	MEDIA_ADDON_DISABLED              = -2147647141, 
    	MEDIA_CHANGE_IN_PROGRESS          = -2147647140, 
    	MEDIA_STALE_CHANGE_COUNT          = -2147647139, 
    	MEDIA_ADDON_RESTRICTED            = -2147647138, 
    	MEDIA_NO_HANDLER                  = -2147647137, 
    	MEDIA_DUPLICATE_FORMAT            = -2147647136, 
    	MEDIA_REALTIME_DISABLED           = -2147647135, 
    	MEDIA_REALTIME_UNAVAILABLE        = -2147647134, 
    	// Mail Kit Errors
    	MAIL_NO_DAEMON                    = -2147540880, 
    	MAIL_UNKNOWN_USER                 = -2147540879, 
    	MAIL_WRONG_PASSWORD               = -2147540878, 
    	MAIL_UNKNOWN_HOST                 = -2147540877, 
    	MAIL_ACCESS_ERROR                 = -2147540876, 
    	MAIL_UNKNOWN_FIELD                = -2147540875, 
    	MAIL_NO_RECIPIENT                 = -2147540874, 
    	MAIL_INVALID_MAIL                 = -2147540873, 
    	// Printing Errors
    	NO_PRINT_SERVER                   = -2147446784, 
    	// Device Kit Errors
    	DEV_INVALID_IOCTL                 = -2147442688, 
    	DEV_NO_MEMORY                     = -2147442687, 
    	DEV_BAD_DRIVE_NUM                 = -2147442686, 
    	DEV_NO_MEDIA                      = -2147442685, 
    	DEV_UNREADABLE                    = -2147442684, 
    	DEV_FORMAT_ERROR                  = -2147442683, 
    	DEV_TIMEOUT                       = -2147442682, 
    	DEV_RECALIBRATE_ERROR             = -2147442681, 
    	DEV_SEEK_ERROR                    = -2147442680, 
    	DEV_ID_ERROR                      = -2147442679, 
    	DEV_READ_ERROR                    = -2147442678, 
    	DEV_WRITE_ERROR                   = -2147442677, 
    	DEV_NOT_READY                     = -2147442676, 
    	DEV_MEDIA_CHANGED                 = -2147442675, 
    	DEV_MEDIA_CHANGE_REQUESTED        = -2147442674, 
    	DEV_RESOURCE_CONFLICT             = -2147442673, 
    	DEV_CONFIGURATION_ERROR           = -2147442672, 
    	DEV_DISABLED_BY_USER              = -2147442671, 
    	DEV_DOOR_OPEN                     = -2147442670, 
    	DEV_INVALID_PIPE                  = -2147442669, 
    	DEV_CRC_ERROR                     = -2147442668, 
    	DEV_STALLED                       = -2147442667, 
    	DEV_BAD_PID                       = -2147442666, 
    	DEV_UNEXPECTED_PID                = -2147442665, 
    	DEV_DATA_OVERRUN                  = -2147442664, 
    	DEV_DATA_UNDERRUN                 = -2147442663, 
    	DEV_FIFO_OVERRUN                  = -2147442662, 
    	DEV_FIFO_UNDERRUN                 = -2147442661, 
    	DEV_PENDING                       = -2147442660, 
    	DEV_MULTIPLE_ERRORS               = -2147442659, 
    	DEV_TOO_LATE                      = -2147442658, 
    	// Translation Kit Errors
    	TRANSLATION_BASE_ERROR            = -2147645216, 
    	NO_TRANSLATOR                     = -2147645215, 
    	ILLEGAL_DATA                      = -2147645214, 
    }
    Related Procedures With Returns

    address_spec ¶

    address_spec :: enum u32 {
    	ANY_ADDRESS             = 0, 
    	EXACT_ADDRESS           = 1, 
    	BASE_ADDRESS            = 2, 
    	CLONE_ADDRESS           = 3, 
    	ANY_KERNEL_ADDRESS      = 4, 
    	// ANY_KERNEL_BLOCK_ADDRESS = 5,
    	RANDOMIZED_ANY_ADDRESS  = 6, 
    	RANDOMIZED_BASE_ADDRESS = 7, 
    }
     

    for create_area() and clone_area()

    Related Procedures With Parameters

    alarm_mode ¶

    alarm_mode :: enum u32 {
    	ONE_SHOT_ABSOLUTE_ALARM = 1, 
    	ONE_SHOT_RELATIVE_ALARM, 
    	PERIODIC_ALARM,              // "when" specifies the period
    }
    Related Procedures With Parameters

    area_id ¶

    area_id :: i32

    area_info ¶

    area_info :: struct {
    	area:       i32,
    	name:       [32]u8,
    	size:       uint,
    	lock:       u32,
    	protection: u32,
    	team:       i32,
    	ram_size:   u32,
    	copy_count: u32,
    	in_count:   u32,
    	out_count:  u32,
    	address:    rawptr,
    }

    area_locking ¶

    area_locking :: enum u32 {
    	NO_LOCK            = 0, 
    	LAZY_LOCK          = 1, 
    	FULL_LOCK          = 2, 
    	CONTIGUOUS         = 3, 
    	LOMEM              = 4, // CONTIGUOUS, < 16 MB physical address
    	_32_BIT_FULL_LOCK  = 5, // FULL_LOCK, < 4 GB physical addresses
    	_32_BIT_CONTIGUOUS = 6, // CONTIGUOUS, < 4 GB physical address
    }
    Related Procedures With Parameters

    area_protection_flags ¶

    area_protection_flags :: enum u32 {
    	READ_AREA      = 1, 
    	WRITE_AREA     = 2, 
    	EXECUTE_AREA   = 4, 
    	// "stack" protection is not available on most platforms - it's used
    	// to only commit memory as needed, and have guard pages at the
    	// bottom of the stack.
    	STACK_AREA     = 8, 
    	CLONEABLE_AREA = 256, 
    }
    Related Procedures With Parameters

    bigtime_t ¶

    bigtime_t :: i64

    blkcnt_t ¶

    blkcnt_t :: i64

    blksize_t ¶

    blksize_t :: i32

    caddr_t ¶

    caddr_t :: ^u8

    clockid_t ¶

    clockid_t :: i32

    cnt_t ¶

    cnt_t :: i32

    cpu_info ¶

    cpu_info :: struct {
    	active_time:       i64,
    	enabled:           bool,
    	current_frequency: u64,
    }

    cpu_platform ¶

    cpu_platform :: enum i32 {
    	UNKNOWN, 
    	x86, 
    	x86_64, 
    	PPC, 
    	PPC_64, 
    	M68K, 
    	ARM, 
    	ARM_64, 
    	ALPHA, 
    	MIPS, 
    	SH, 
    	SPARC, 
    	RISC_V, 
    }

    cpu_topology_node_info ¶

    cpu_topology_node_info :: struct {
    	id:    u32,
    	type:  topology_level_type,
    	level: u32,
    	data:  struct #raw_union {
    		_root:    struct {
    			platform: cpu_platform,
    		},
    		_package: struct {
    			vendor:          cpu_vendor,
    			cache_line_size: u32,
    		},
    		_core:    struct {
    			model:             u32,
    			default_frequency: u64,
    		},
    	},
    }

    cpu_vendor ¶

    cpu_vendor :: enum i32 {
    	UNKNOWN, 
    	AMD, 
    	CYRIX, 
    	IDT, 
    	INTEL, 
    	NATIONAL_SEMICONDUCTOR, 
    	RISE, 
    	TRANSMETA, 
    	VIA, 
    	IBM, 
    	MOTOROLA, 
    	NEC, 
    	HYGON, 
    	SUN, 
    	FUJITSU, 
    }

    dev_t ¶

    dev_t :: i32

    directory_which ¶

    directory_which :: enum i32 {
    	// Per volume directories
    	DESKTOP_DIRECTORY                          = 0, 
    	TRASH_DIRECTORY, 
    	// System directories
    	SYSTEM_DIRECTORY                           = 1000, 
    	SYSTEM_ADDONS_DIRECTORY                    = 1002, 
    	SYSTEM_BOOT_DIRECTORY, 
    	SYSTEM_FONTS_DIRECTORY, 
    	SYSTEM_LIB_DIRECTORY, 
    	SYSTEM_SERVERS_DIRECTORY, 
    	SYSTEM_APPS_DIRECTORY, 
    	SYSTEM_BIN_DIRECTORY, 
    	SYSTEM_DOCUMENTATION_DIRECTORY             = 1010, 
    	SYSTEM_PREFERENCES_DIRECTORY, 
    	SYSTEM_TRANSLATORS_DIRECTORY, 
    	SYSTEM_MEDIA_NODES_DIRECTORY, 
    	SYSTEM_SOUNDS_DIRECTORY, 
    	SYSTEM_DATA_DIRECTORY, 
    	SYSTEM_DEVELOP_DIRECTORY, 
    	SYSTEM_PACKAGES_DIRECTORY, 
    	SYSTEM_HEADERS_DIRECTORY, 
    	SYSTEM_ETC_DIRECTORY                       = 2008, 
    	SYSTEM_SETTINGS_DIRECTORY                  = 2010, 
    	SYSTEM_LOG_DIRECTORY                       = 2012, 
    	SYSTEM_SPOOL_DIRECTORY, 
    	SYSTEM_TEMP_DIRECTORY, 
    	SYSTEM_VAR_DIRECTORY, 
    	SYSTEM_CACHE_DIRECTORY                     = 2020, 
    	SYSTEM_NONPACKAGED_DIRECTORY               = 2023, 
    	SYSTEM_NONPACKAGED_ADDONS_DIRECTORY, 
    	SYSTEM_NONPACKAGED_TRANSLATORS_DIRECTORY, 
    	SYSTEM_NONPACKAGED_MEDIA_NODES_DIRECTORY, 
    	SYSTEM_NONPACKAGED_BIN_DIRECTORY, 
    	SYSTEM_NONPACKAGED_DATA_DIRECTORY, 
    	SYSTEM_NONPACKAGED_FONTS_DIRECTORY, 
    	SYSTEM_NONPACKAGED_SOUNDS_DIRECTORY, 
    	SYSTEM_NONPACKAGED_DOCUMENTATION_DIRECTORY, 
    	SYSTEM_NONPACKAGED_LIB_DIRECTORY, 
    	SYSTEM_NONPACKAGED_HEADERS_DIRECTORY, 
    	SYSTEM_NONPACKAGED_DEVELOP_DIRECTORY, 
    	// User directories. These are interpreted in the context of the user making the find_directory call.
    	USER_DIRECTORY                             = 3000, 
    	USER_CONFIG_DIRECTORY, 
    	USER_ADDONS_DIRECTORY, 
    	USER_BOOT_DIRECTORY, 
    	USER_FONTS_DIRECTORY, 
    	USER_LIB_DIRECTORY, 
    	USER_SETTINGS_DIRECTORY, 
    	USER_DESKBAR_DIRECTORY, 
    	USER_PRINTERS_DIRECTORY, 
    	USER_TRANSLATORS_DIRECTORY, 
    	USER_MEDIA_NODES_DIRECTORY, 
    	USER_SOUNDS_DIRECTORY, 
    	USER_DATA_DIRECTORY, 
    	USER_CACHE_DIRECTORY, 
    	USER_PACKAGES_DIRECTORY, 
    	USER_HEADERS_DIRECTORY, 
    	USER_NONPACKAGED_DIRECTORY, 
    	USER_NONPACKAGED_ADDONS_DIRECTORY, 
    	USER_NONPACKAGED_TRANSLATORS_DIRECTORY, 
    	USER_NONPACKAGED_MEDIA_NODES_DIRECTORY, 
    	USER_NONPACKAGED_BIN_DIRECTORY, 
    	USER_NONPACKAGED_DATA_DIRECTORY, 
    	USER_NONPACKAGED_FONTS_DIRECTORY, 
    	USER_NONPACKAGED_SOUNDS_DIRECTORY, 
    	USER_NONPACKAGED_DOCUMENTATION_DIRECTORY, 
    	USER_NONPACKAGED_LIB_DIRECTORY, 
    	USER_NONPACKAGED_HEADERS_DIRECTORY, 
    	USER_NONPACKAGED_DEVELOP_DIRECTORY, 
    	USER_DEVELOP_DIRECTORY, 
    	USER_DOCUMENTATION_DIRECTORY, 
    	USER_SERVERS_DIRECTORY, 
    	USER_APPS_DIRECTORY, 
    	USER_BIN_DIRECTORY, 
    	USER_PREFERENCES_DIRECTORY, 
    	USER_ETC_DIRECTORY, 
    	USER_LOG_DIRECTORY, 
    	USER_SPOOL_DIRECTORY, 
    	USER_VAR_DIRECTORY, 
    	// Global directories
    	APPS_DIRECTORY                             = 4000, 
    	PREFERENCES_DIRECTORY, 
    	UTILITIES_DIRECTORY, 
    	PACKAGE_LINKS_DIRECTORY, 
    	// Obsolete: Legacy BeOS definition to be phased out
    	BEOS_DIRECTORY                             = 1000, 
    	BEOS_SYSTEM_DIRECTORY, 
    	BEOS_ADDONS_DIRECTORY, 
    	BEOS_BOOT_DIRECTORY, 
    	BEOS_FONTS_DIRECTORY, 
    	BEOS_LIB_DIRECTORY, 
    	BEOS_SERVERS_DIRECTORY, 
    	BEOS_APPS_DIRECTORY, 
    	BEOS_BIN_DIRECTORY, 
    	BEOS_ETC_DIRECTORY, 
    	BEOS_DOCUMENTATION_DIRECTORY, 
    	BEOS_PREFERENCES_DIRECTORY, 
    	BEOS_TRANSLATORS_DIRECTORY, 
    	BEOS_MEDIA_NODES_DIRECTORY, 
    	BEOS_SOUNDS_DIRECTORY, 
    }
    Related Procedures With Parameters

    find_path_flags ¶

    find_path_flags :: enum i32 {
    	CREATE_DIRECTORY        = 1, 
    	CREATE_PARENT_DIRECTORY = 2, 
    	EXISTING_ONLY           = 4, 
    	// find_paths() only!
    	SYSTEM_ONLY             = 16, 
    	USER_ONLY               = 32, 
    }
    Related Procedures With Parameters

    fsblkcnt_t ¶

    fsblkcnt_t :: i64

    fsfilcnt_t ¶

    fsfilcnt_t :: i64

    generic_addr_t ¶

    generic_addr_t :: uintptr

    generic_size_t ¶

    generic_size_t :: uintptr

    gid_t ¶

    gid_t :: u32

    image_id ¶

    image_id :: i32

    ino_t ¶

    ino_t :: i64

    key_t ¶

    key_t :: i32

    mode_t ¶

    mode_t :: u32

    nanotime_t ¶

    nanotime_t :: i64
    nlink_t :: i32

    off_t ¶

    off_t :: i64

    path_base_directory ¶

    path_base_directory :: enum i32 {
    	INSTALLATION_LOCATION_DIRECTORY, 
    	ADD_ONS_DIRECTORY, 
    	APPS_DIRECTORY, 
    	BIN_DIRECTORY, 
    	BOOT_DIRECTORY, 
    	CACHE_DIRECTORY, 
    	DATA_DIRECTORY, 
    	DEVELOP_DIRECTORY, 
    	DEVELOP_LIB_DIRECTORY, 
    	DOCUMENTATION_DIRECTORY, 
    	ETC_DIRECTORY, 
    	FONTS_DIRECTORY, 
    	HEADERS_DIRECTORY, 
    	LIB_DIRECTORY, 
    	LOG_DIRECTORY, 
    	MEDIA_NODES_DIRECTORY, 
    	PACKAGES_DIRECTORY, 
    	PREFERENCES_DIRECTORY, 
    	SERVERS_DIRECTORY, 
    	SETTINGS_DIRECTORY, 
    	SOUNDS_DIRECTORY, 
    	SPOOL_DIRECTORY, 
    	TRANSLATORS_DIRECTORY, 
    	VAR_DIRECTORY, 
    	// find_path() only!
    	IMAGE_PATH                      = 1000, 
    	PACKAGE_PATH, 
    }
    Related Procedures With Parameters

    perform_code ¶

    perform_code :: u32

    pid_t ¶

    pid_t :: i32

    port_flags ¶

    port_flags :: enum u32 {
    	USE_USER_MEMCPY   = 2147483648, 
    	// read the message, but don't remove it; kernel-only; memory must be locked
    	PEEK_PORT_MESSAGE = 256, 
    }
    Related Procedures With Parameters

    port_id ¶

    port_id :: i32

    port_info ¶

    port_info :: struct {
    	port:        i32,
    	team:        i32,
    	name:        [32]u8,
    	capacity:    i32,
    	// queue depth
    	queue_count: i32,
    	// # msgs waiting to be read
    	total_count: i32,
    }

    sem_id ¶

    sem_id :: i32

    sem_info ¶

    sem_info :: struct {
    	sem:           i32,
    	team:          i32,
    	name:          [32]u8,
    	count:         i32,
    	latest_holder: i32,
    }

    semaphore_flags ¶

    semaphore_flags :: enum u32 {
    	CAN_INTERRUPT           = 1,  // acquisition of the semaphore can be interrupted (system use only)
    	CHECK_PERMISSION        = 4,  // ownership will be checked (system use only)
    	KILL_CAN_INTERRUPT      = 32, // acquisition of the semaphore can be interrupted by SIGKILL[THR], even if not CAN_INTERRUPT (system use only)
    	// release_sem_etc() only flags
    	DO_NOT_RESCHEDULE       = 2,  // thread is not rescheduled
    	RELEASE_ALL             = 8,  // all waiting threads will be woken up, count will be zeroed
    	RELEASE_IF_WAITING_ONLY = 16, // release count only if there are any threads waiting
    }
    Related Procedures With Parameters

    sig_atomic_t ¶

    sig_atomic_t :: i32

    siginfo_t ¶

    siginfo_t :: struct {
    	si_signo:  i32,
    	// signal number
    	si_code:   i32,
    	// signal code
    	si_errno:  i32,
    	// if non zero, an error number associated with this signal
    	si_pid:    i32,
    	// sending process ID
    	si_uid:    u32,
    	// real user ID of sending process
    	si_addr:   rawptr,
    	// address of faulting instruction
    	si_status: i32,
    	// exit value or signal
    	si_band:   i64,
    	// band event for SIGPOLL
    	si_value:  sigval,
    }
    Related Procedures With Parameters

    sigset_t ¶

    sigset_t :: u64

    sigval ¶

    sigval :: struct #raw_union {
    	sival_int: i32,
    	sival_ptr: rawptr,
    }

    status_t ¶

    status_t :: i32

    system_info ¶

    system_info :: struct {
    	boot_time:         i64,
    	// time of boot (usecs since 1/1/1970)
    	cpu_count:         u32,
    	// number of cpus
    	max_pages:         u64,
    	// total # of accessible pages
    	used_pages:        u64,
    	// # of accessible pages in use
    	cached_pages:      u64,
    	block_cache_pages: u64,
    	ignored_pages:     u64,
    	// # of ignored/inaccessible pages
    	needed_memory:     u64,
    	free_memory:       u64,
    	max_swap_pages:    u64,
    	free_swap_pages:   u64,
    	page_faults:       u32,
    	// # of page faults
    	max_sems:          u32,
    	used_sems:         u32,
    	max_ports:         u32,
    	used_ports:        u32,
    	max_threads:       u32,
    	used_threads:      u32,
    	max_teams:         u32,
    	used_teams:        u32,
    	kernel_name:       [256]u8,
    	kernel_build_date: [32]u8,
    	kernel_build_time: [32]u8,
    	kernel_version:    i64,
    	abi:               u32,
    }
    Related Procedures With Parameters

    team_id ¶

    team_id :: i32

    team_info ¶

    team_info :: struct {
    	team:                i32,
    	thread_count:        i32,
    	image_count:         i32,
    	area_count:          i32,
    	debugger_nub_thread: i32,
    	debugger_nub_port:   i32,
    	argc:                i32,
    	args:                [64]u8,
    	uid:                 u32,
    	gid:                 u32,
    	// Haiku R1 extensions
    	real_uid:            u32,
    	real_gid:            u32,
    	group_id:            i32,
    	session_id:          i32,
    	parent:              i32,
    	name:                [32]u8,
    	start_time:          i64,
    }

    team_usage_info ¶

    team_usage_info :: struct {
    	user_time:   i64,
    	kernel_time: i64,
    }

    team_usage_who ¶

    team_usage_who :: enum i32 {
    	// compatible to sys/resource.h RUSAGE_SELF and RUSAGE_CHILDREN
    	SELF     = 0, 
    	CHILDREN = -1, 
    }

    thread_func ¶

    thread_func :: proc "c" (_: rawptr) -> i32

    thread_id ¶

    thread_id :: i32

    thread_info ¶

    thread_info :: struct {
    	thread:      i32,
    	team:        i32,
    	name:        [32]u8,
    	state:       thread_state,
    	priority:    thread_priority,
    	sem:         i32,
    	user_time:   i64,
    	kernel_time: i64,
    	stack_base:  rawptr,
    	stack_end:   rawptr,
    }

    thread_priority ¶

    thread_priority :: enum i32 {
    	IDLE_PRIORITY              = 0, 
    	LOWEST_ACTIVE_PRIORITY     = 1, 
    	LOW_PRIORITY               = 5, 
    	NORMAL_PRIORITY            = 10, 
    	DISPLAY_PRIORITY           = 15, 
    	URGENT_DISPLAY_PRIORITY    = 20, 
    	REAL_TIME_DISPLAY_PRIORITY = 100, 
    	URGENT_PRIORITY            = 110, 
    	REAL_TIME_PRIORITY         = 120, 
    }
    Related Procedures With Parameters
    Related Constants

    thread_state ¶

    thread_state :: enum i32 {
    	RUNNING   = 1, 
    	READY, 
    	RECEIVING, 
    	ASLEEP, 
    	SUSPENDED, 
    	WAITING, 
    }

    time_t ¶

    time_t :: i64

    topology_level_type ¶

    topology_level_type :: enum i32 {
    	UNKNOWN, 
    	ROOT, 
    	SMT, 
    	CORE, 
    	PACKAGE, 
    }

    type_code ¶

    type_code :: u32

    uid_t ¶

    uid_t :: u32

    umode_t ¶

    umode_t :: u32

    Constants

    APP_IMAGE_SYMBOL ¶

    APP_IMAGE_SYMBOL :: rawptr(addr_t(0))
     

    value that can be used instead of a pointer to a symbol in the program image

    CURRENT_TEAM ¶

    CURRENT_TEAM :: 0

    FILE_NAME_LENGTH ¶

    FILE_NAME_LENGTH :: NAME_MAX

    FIRST_REAL_TIME_PRIORITY ¶

    FIRST_REAL_TIME_PRIORITY :: thread_priority.REAL_TIME_PRIORITY

    MAXPATHLEN ¶

    MAXPATHLEN :: PATH_MAX

    NAME_MAX ¶

    NAME_MAX :: 256

    OS_NAME_LENGTH ¶

    OS_NAME_LENGTH :: 32

    PATH_MAX ¶

    PATH_MAX :: 1024

    PATH_NAME_LENGTH ¶

    PATH_NAME_LENGTH :: MAXPATHLEN

    SIGABRT ¶

    SIGABRT :: 6
     

    abort() called, dont' catch

    SIGALRM ¶

    SIGALRM :: 14
     

    an alarm has gone off (see alarm())

    SIGBUS ¶

    SIGBUS :: 30
     

    access to undefined portion of a memory object

    SIGCHLD ¶

    SIGCHLD :: 5
     

    child process exited

    SIGCONT ¶

    SIGCONT :: 12
     

    continue execution if suspended

    SIGFPE ¶

    SIGFPE :: 8
     

    floating point exception

    SIGHUP ¶

    SIGHUP :: 1
     

    hangup -- tty is gone!

    SIGILL ¶

    SIGILL :: 4
     

    illegal instruction

    SIGINT ¶

    SIGINT :: 2
     

    interrupt

    SIGKILL ¶

    SIGKILL :: 9
     

    kill a team (not catchable)

    SIGKILLTHR ¶

    SIGKILLTHR :: 21
     

    be specific: kill just the thread, not team

    SIGPIPE ¶

    SIGPIPE :: 7
     

    write to a pipe w/no readers

    SIGPOLL ¶

    SIGPOLL :: 23
     

    Pollable event

    SIGPROF ¶

    SIGPROF :: 24
     

    Profiling timer expired

    SIGQUIT ¶

    SIGQUIT :: 3
     

    `quit' special character typed in tty

    SIGSEGV ¶

    SIGSEGV :: 11
     

    segmentation violation (read: invalid pointer)

    SIGSTOP ¶

    SIGSTOP :: 10
     

    suspend a thread (not catchable)

    SIGSYS ¶

    SIGSYS :: 25
     

    Bad system call

    SIGTERM ¶

    SIGTERM :: 15
     

    termination requested

    SIGTRAP ¶

    SIGTRAP :: 22
     

    Trace/breakpoint trap

    SIGTSTP ¶

    SIGTSTP :: 13
     

    `stop' special character typed in tty

    SIGTTIN ¶

    SIGTTIN :: 16
     

    read of tty from bg process

    SIGTTOU ¶

    SIGTTOU :: 17
     

    write to tty from bg process

    SIGURG ¶

    SIGURG :: 26
     

    High bandwidth data is available at socket

    SIGUSR1 ¶

    SIGUSR1 :: 18
     

    app defined signal 1

    SIGUSR2 ¶

    SIGUSR2 :: 19
     

    app defined signal 2

    SIGVTALRM ¶

    SIGVTALRM :: 27
     

    Virtual timer expired

    SIGWINCH ¶

    SIGWINCH :: 20
     

    tty window size changed

    SIGXCPU ¶

    SIGXCPU :: 28
     

    CPU time limit exceeded

    SIGXFSZ ¶

    SIGXFSZ :: 29
     

    File size limit exceeded

    SIG_BLOCK ¶

    SIG_BLOCK :: 1

    SIG_SETMASK ¶

    SIG_SETMASK :: 3

    SIG_UNBLOCK ¶

    SIG_UNBLOCK :: 2

    SYSTEM_TEAM ¶

    SYSTEM_TEAM :: 1

    SYSTEM_TIMEBASE ¶

    SYSTEM_TIMEBASE :: 0
     

    time base for snooze_*(), compatible with the clockid_t constants defined in <time.h>

    Variables

    This section is empty.

    Procedures

    acquire_sem ¶

    acquire_sem :: proc "c" (id: i32) -> i32 ---

    acquire_sem_etc ¶

    acquire_sem_etc :: proc "c" (id: i32, count: i32, flags: semaphore_flags, timeout: i64) -> i32 ---

    area_for ¶

    area_for :: proc "c" (address: rawptr) -> i32 ---

    clone_area ¶

    clone_area :: proc "c" (name: cstring, destAddress: ^rawptr, addressSpec: address_spec, protection: area_protection_flags, source: i32) -> i32 ---

    close_port ¶

    close_port :: proc "c" (port: i32) -> i32 ---

    create_area ¶

    create_area :: proc "c" (
    	name:         cstring, 
    	startAddress: ^rawptr, 
    	addressSpec:  address_spec, 
    	size:         uint, 
    	lock:         area_locking, 
    	protection:   area_protection_flags, 
    ) -> i32 ---

    create_port ¶

    create_port :: proc "c" (capacity: i32, name: cstring) -> i32 ---

    create_sem ¶

    create_sem :: proc "c" (count: i32, name: cstring) -> i32 ---

    current_image_symbol ¶

    current_image_symbol :: proc() -> rawptr {…}
     

    pointer to a symbol in the callers image (same as B_CURRENT_IMAGE_SYMBOL)

    debugger ¶

    debugger :: proc "c" (message: cstring) ---

    delete_area ¶

    delete_area :: proc "c" (id: i32) -> i32 ---

    delete_port ¶

    delete_port :: proc "c" (port: i32) -> i32 ---

    delete_sem ¶

    delete_sem :: proc "c" (id: i32) -> i32 ---

    disable_debugger ¶

    disable_debugger :: proc "c" (state: i32) -> i32 ---
     

    calling this function with a non-zero value will cause your thread

    	to receive signals for any exceptional conditions that occur (i.e.
    	you'll get SIGSEGV for data access exceptions, SIGFPE for floating
    	point errors, SIGILL for illegal instructions, etc).
    
    	to re-enable the default debugger pass a zero.
    

    errno ¶

    errno :: proc "contextless" () -> Errno {…}

    exit_thread ¶

    exit_thread :: proc "c" (status: i32) ---

    find_area ¶

    find_area :: proc "c" (name: cstring) -> i32 ---

    find_directory ¶

    find_directory :: proc "c" (which: directory_which, volume: i32, createIt: bool, pathString: [^]u8, length: i32) -> i32 ---

    find_path ¶

    find_path :: proc "c" (codePointer: rawptr, baseDirectory: path_base_directory, subPath: cstring, pathBuffer: [^]u8, bufferSize: uint) -> i32 ---

    find_path_etc ¶

    find_path_etc :: proc "c" (
    	codePointer:   rawptr, 
    	dependency:    cstring, 
    	architecture:  cstring, 
    	baseDirectory: path_base_directory, 
    	subPath:       cstring, 
    	flags:         find_path_flags, 
    	pathBuffer:    [^]u8, 
    	bufferSize:    uint, 
    ) -> i32 ---

    find_path_for_path ¶

    find_path_for_path :: proc "c" (path: cstring, baseDirectory: path_base_directory, subPath: cstring, pathBuffer: [^]u8, bufferSize: uint) -> i32 ---

    find_path_for_path_etc ¶

    find_path_for_path_etc :: proc "c" (
    	path:          cstring, 
    	dependency:    cstring, 
    	architecture:  cstring, 
    	baseDirectory: path_base_directory, 
    	subPath:       cstring, 
    	flags:         find_path_flags, 
    	pathBuffer:    [^]u8, 
    	bufferSize:    uint, 
    ) -> i32 ---

    find_paths ¶

    find_paths :: proc "c" (baseDirectory: path_base_directory, subPath: cstring, _paths: ^[^][^]u8, _pathCount: ^uint) -> i32 ---

    find_paths_etc ¶

    find_paths_etc :: proc "c" (
    	architecture:  cstring, 
    	baseDirectory: path_base_directory, 
    	subPath:       cstring, 
    	flags:         find_path_flags, 
    	_paths:        ^[^][^]u8, 
    	_pathCount:    ^uint, 
    ) -> i32 ---

    find_port ¶

    find_port :: proc "c" (name: cstring) -> i32 ---

    find_thread ¶

    find_thread :: proc "c" (name: cstring) -> i32 ---

    get_cpu_topology_info ¶

    get_cpu_topology_info :: proc "c" (topologyInfos: [^]cpu_topology_node_info, topologyInfoCount: ^u32) -> i32 ---

    get_pthread_thread_id ¶

    get_pthread_thread_id :: proc "c" (thread: rawptr) -> i32 ---
     

    bridge to the pthread API

    get_sem_count ¶

    get_sem_count :: proc "c" (id: i32, threadCount: ^i32) -> i32 ---

    get_system_info ¶

    get_system_info :: proc "c" (info: ^system_info) -> i32 ---

    has_data ¶

    has_data :: proc "c" (thread: i32) -> bool ---

    is_computer_on ¶

    is_computer_on :: proc "c" () -> i32 ---

    is_computer_on_fire ¶

    is_computer_on_fire :: proc "c" () -> f64 ---

    kill_team ¶

    kill_team :: proc "c" (team: i32) -> i32 ---
     

    see also: send_signal()

    kill_thread ¶

    kill_thread :: proc "c" (thread: i32) -> i32 ---

    on_exit_thread ¶

    on_exit_thread :: proc "c" (callback: proc "c" (_: rawptr), data: rawptr) -> i32 ---

    port_buffer_size ¶

    port_buffer_size :: proc "c" (port: i32) -> int ---

    port_buffer_size_etc ¶

    port_buffer_size_etc :: proc "c" (port: i32, flags: port_flags, timeout: i64) -> int ---

    port_count ¶

    port_count :: proc "c" (port: i32) -> int ---

    read_port ¶

    read_port :: proc "c" (port: i32, code: ^i32, buffer: rawptr, bufferSize: uint) -> int ---

    read_port_etc ¶

    read_port_etc :: proc "c" (
    	port:       i32, 
    	code:       ^i32, 
    	buffer:     rawptr, 
    	bufferSize: uint, 
    	flags:      port_flags, 
    	timeout:    i64, 
    ) -> int ---

    real_time_clock ¶

    real_time_clock :: proc "c" () -> u64 ---

    real_time_clock_usecs ¶

    real_time_clock_usecs :: proc "c" () -> i64 ---

    receive_data ¶

    receive_data :: proc "c" (sender: ^i32, buffer: rawptr, bufferSize: uint) -> i32 ---

    release_sem ¶

    release_sem :: proc "c" (id: i32) -> i32 ---

    release_sem_etc ¶

    release_sem_etc :: proc "c" (id: i32, count: i32, flags: semaphore_flags) -> i32 ---

    rename_thread ¶

    rename_thread :: proc "c" (thread: i32, newName: cstring) -> i32 ---

    resize_area ¶

    resize_area :: proc "c" (id: i32, newSize: uint) -> i32 ---

    resume_thread ¶

    resume_thread :: proc "c" (thread: i32) -> i32 ---

    send_data ¶

    send_data :: proc "c" (thread: i32, code: i32, buffer: rawptr, bufferSize: uint) -> i32 ---

    send_signal ¶

    send_signal :: proc "c" (threadID: i32, signal: u32) -> i32 ---

    set_alarm ¶

    set_alarm :: proc "c" (_when: i64, mode: alarm_mode) -> i64 ---

    set_area_protection ¶

    set_area_protection :: proc "c" (id: i32, newProtection: area_protection_flags) -> i32 ---

    set_port_owner ¶

    set_port_owner :: proc "c" (port: i32, team: i32) -> i32 ---

    set_real_time_clock ¶

    set_real_time_clock :: proc "c" (secsSinceJan1st1970: u64) ---

    set_sem_owner ¶

    set_sem_owner :: proc "c" (id: i32, team: i32) -> i32 ---

    set_signal_stack ¶

    set_signal_stack :: proc "c" (base: rawptr, size: uint) ---

    set_thread_priority ¶

    set_thread_priority :: proc "c" (thread: i32, newPriority: thread_priority) -> i32 ---

    sigaddset ¶

    sigaddset :: proc "c" (set: ^u64, _signal: i32) -> i32 ---

    sigdelset ¶

    sigdelset :: proc "c" (set: ^u64, _signal: i32) -> i32 ---

    sigemptyset ¶

    sigemptyset :: proc "c" (set: ^u64) -> i32 ---
     

    signal set (sigset_t) manipulation

    sigfillset ¶

    sigfillset :: proc "c" (set: ^u64) -> i32 ---

    sigismember ¶

    sigismember :: proc "c" (set: ^u64, _signal: i32) -> i32 ---

    sigpause ¶

    sigpause :: proc "c" (_signal: i32) -> i32 ---

    sigpending ¶

    sigpending :: proc "c" (set: ^u64) -> i32 ---
     

    querying and waiting for signals

    sigsuspend ¶

    sigsuspend :: proc "c" (mask: ^u64) -> i32 ---

    sigtimedwait ¶

    sigtimedwait :: proc "c" (set: ^u64, info: ^siginfo_t, timeout: ^unix.timespec) -> i32 ---

    sigwait ¶

    sigwait :: proc "c" (set: ^u64, _signal: ^i32) -> i32 ---

    sigwaitinfo ¶

    sigwaitinfo :: proc "c" (set: ^u64, info: ^siginfo_t) -> i32 ---

    snooze ¶

    snooze :: proc "c" (amount: i64) -> i32 ---

    snooze_etc ¶

    snooze_etc :: proc "c" (amount: i64, timeBase: i32, flags: u32) -> i32 ---
     

    FIXME: Find and define those flags.

    snooze_until ¶

    snooze_until :: proc "c" (time: i64, timeBase: i32) -> i32 ---

    spawn_thread ¶

    spawn_thread :: proc "c" (thread_func, name: cstring, priority: thread_priority, data: rawptr) -> i32 ---

    suspend_thread ¶

    suspend_thread :: proc "c" (thread: i32) -> i32 ---

    switch_sem ¶

    switch_sem :: proc "c" (semToBeReleased: i32) -> i32 ---

    switch_sem_etc ¶

    switch_sem_etc :: proc "c" (semToBeReleased: i32, id: i32, count: i32, flags: semaphore_flags, timeout: i64) -> i32 ---

    system_time ¶

    system_time :: proc "c" () -> i64 ---
     

    time since booting in microseconds

    system_time_nsecs ¶

    system_time_nsecs :: proc "c" () -> i64 ---
     

    time since booting in nanoseconds

    wait_for_thread ¶

    wait_for_thread :: proc "c" (thread: i32, returnValue: ^i32) -> i32 ---

    wait_for_thread_etc ¶

    wait_for_thread_etc :: proc "c" (id: i32, flags: u32, timeout: i64, _returnCode: ^i32) -> i32 ---
     

    FIXME: Find and define those flags.

    write_port ¶

    write_port :: proc "c" (port: i32, code: i32, buffer: rawptr, bufferSize: uint) -> i32 ---

    write_port_etc ¶

    write_port_etc :: proc "c" (
    	port:       i32, 
    	code:       i32, 
    	buffer:     rawptr, 
    	bufferSize: uint, 
    	flags:      port_flags, 
    	timeout:    i64, 
    ) -> i32 ---

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2024-04 (vendor "odin") Windows_amd64 @ 2024-04-26 21:08:58.691797500 +0000 UTC