blob: 5d37e27537546f65aecc2bd407b44ea81d5cd19c [file] [log] [blame] [view]
# Zircon System Calls
[Life of a Fuchsia syscall](/docs/concepts/kernel/life_of_a_syscall.md)
## Handles
* [handle_check_valid](handle_check_valid.md) - Checks a handle's validity.
* [handle_close](handle_close.md) - Close a handle.
* [handle_close_many](handle_close_many.md) - Close a number of handles.
* [handle_duplicate](handle_duplicate.md) - Duplicate a handle.
* [handle_replace](handle_replace.md) - Replace a handle.
## Objects
* [object_get_child](object_get_child.md) - Given a kernel object with children objects, obtain a handle to the child specified by the provided kernel object id.
* [object_get_info](object_get_info.md) - Query information about an object.
* [object_get_property](object_get_property.md) - Ask for various properties of various kernel objects.
* [object_set_profile](object_set_profile.md) - Apply a scheduling profile to a thread.
* [object_set_property](object_set_property.md) - Set various properties of various kernel objects.
* [object_signal](object_signal.md) - Signal an object.
* [object_signal_peer](object_signal_peer.md) - Signal an object's peer.
* [object_wait_async](object_wait_async.md) - Subscribe for signals on an object.
* [object_wait_many](object_wait_many.md) - Wait for signals on multiple objects.
* [object_wait_one](object_wait_one.md) - Wait for signals on an object.
## Threads
* [thread_create](thread_create.md) - Create a thread.
* [thread_exit](thread_exit.md) - Terminate the current running thread.
* [thread_legacy_yield](thread_legacy_yield.md) - Yield the CPU of the current thread back to the scheduler.
* [thread_raise_exception](thread_raise_exception.md) - Raise a user-generated exception.
* [thread_read_state](thread_read_state.md) - Read one aspect of thread state.
* [thread_set_rseq](thread_set_rseq.md) - Register a restartable sequence for a thread.
* [thread_start](thread_start.md) - Start execution on a thread.
* [thread_write_state](thread_write_state.md) - Write one aspect of thread state.
## Thread Sampling
* [sampler_create](sampler_create.md) - Create a sampler session, returning an IOBuffer containing a buffer allocated for each
* [sampler_read](sampler_read.md) - Read out available samples.
* [sampler_start](sampler_start.md) - Begin sampling to the provided IOBuffer.
* [sampler_stop](sampler_stop.md) - Stop writing samples to the provided IOBuffer.
## IO Buffers
* [iob_allocate_id](iob_allocate_id.md) - Allocates an ID out of an IOBuffer region of discipline
* [iob_create](iob_create.md) - Create an IOBuffer with a set of options.
* [iob_create_shared_region](iob_create_shared_region.md) - Creates a shared region that can be used with multiple IOBuffer objects.
* [iob_writev](iob_writev.md) - Performs a mediated write to an IOBuffer region.
## Processes
* [process_create](process_create.md) - Create a new process.
* [process_create_shared](process_create_shared.md) - Create a new process that can share part of its address space with other processes.
* [process_exit](process_exit.md) - Exits the currently running process.
* [process_read_memory](process_read_memory.md) - Read from the given process's address space.
* [process_start](process_start.md) - Start execution on a process.
* [process_write_memory](process_write_memory.md) - Write into the given process's address space.
## Jobs
* [job_create](job_create.md) - Create a new job.
* [job_set_critical](job_set_critical.md) - Set a process as critical to a job.
* [job_set_policy](job_set_policy.md) - Set job security and resource policies.
## Tasks (Thread, Process, or Job)
* [task_create_exception_channel](task_create_exception_channel.md) - Create an exception channel for a given job, process, or thread.
* [task_kill](task_kill.md) - Kill the provided job or process.
* [task_suspend](task_suspend.md) - Suspend the given task. Currently only thread or process handles may be suspended.
* [task_suspend_token](task_suspend_token.md) - Suspend the given task. Currently only thread or process handles may be suspended.
## Profiles
* [profile_create](profile_create.md) - Create a scheduler profile.
## Exceptions
* [exception_get_process](exception_get_process.md) - Create a handle for the exception's process.
* [exception_get_thread](exception_get_thread.md) - Create a handle for the exception's thread.
## Channels
* [channel_call](channel_call.md) - Send a message to a channel and await a reply.
* [channel_call_etc](channel_call_etc.md) - Send a message to a channel and await a reply.
* [channel_create](channel_create.md) - Create a channel.
* [channel_read](channel_read.md) - Read a message from a channel.
* [channel_read_etc](channel_read_etc.md) - Read a message from a channel.
* [channel_write](channel_write.md) - Write a message to a channel.
* [channel_write_etc](channel_write_etc.md) - Write a message to a channel.
## Sockets
* [socket_create](socket_create.md) - Create a socket.
* [socket_read](socket_read.md) - Read data from a socket.
* [socket_set_disposition](socket_set_disposition.md) - Set disposition of writes.
* [socket_write](socket_write.md) - Write data to a socket.
## Streams
* [stream_create](stream_create.md) - Create a stream from a VMO.
* [stream_readv](stream_readv.md) - Read data from a stream at the current seek offset.
* [stream_readv_at](stream_readv_at.md) - Read data from a stream at the given offset.
* [stream_seek](stream_seek.md) - Modify the seek offset.
* [stream_writev](stream_writev.md) - Write data to a stream at the current seek offset.
* [stream_writev_at](stream_writev_at.md) - Write data to a stream at the given offset.
## Fifos
* [fifo_create](fifo_create.md) - Create a fifo.
* [fifo_read](fifo_read.md) - Read data from a fifo.
* [fifo_write](fifo_write.md) - Write data to a fifo.
## Events, Event Pairs, and Counters
* [counter_add](counter_add.md) - Add a value to a counter.
* [counter_create](counter_create.md) - Create a counter.
* [counter_read](counter_read.md) - Read the value of a counter.
* [counter_write](counter_write.md) - Write a value to a counter.
* [event_create](event_create.md) - Create an event.
* [eventpair_create](eventpair_create.md) - Create an event pair.
* [system_get_event](system_get_event.md) - Retrieve a handle to a system event.
## Ports
* [port_cancel](port_cancel.md) - Cancels async port notifications on an object.
* [port_cancel_key](port_cancel_key.md) - Cancels all async port notifications matching a key.
* [port_create](port_create.md) - Create an IO port.
* [port_queue](port_queue.md) - Queue a packet to a port.
* [port_wait](port_wait.md) - Wait for a packet arrival in a port.
## Futexes
* [futex_get_owner](futex_get_owner.md) - Fetch the koid current owner of a futex, if any.
* [futex_requeue](futex_requeue.md) - Wake some number of threads waiting on a futex, and move more waiters to another wait queue.
* [futex_requeue_single_owner](futex_requeue_single_owner.md) - Wake one thread waiting on a futex, and requeue more waiters to another futex wait queue.
* [futex_wait](futex_wait.md) - Wait on a futex.
* [futex_wake](futex_wake.md) - Wake some number of threads waiting on a futex, and set the ownership of the futex to nothing.
* [futex_wake_handle_close_thread_exit](futex_wake_handle_close_thread_exit.md) - Write to futex, wake futex, close handle, exit.
* [futex_wake_single_owner](futex_wake_single_owner.md) - Wake one thread waiting on a futex, and set the ownership of the futex to that thread.
## Virtual Memory Objects (VMOs)
* [vmo_create](vmo_create.md) - Create a VM object.
* [vmo_create_child](vmo_create_child.md) -
* [vmo_create_contiguous](vmo_create_contiguous.md) -
* [vmo_create_physical](vmo_create_physical.md) -
* [vmo_get_size](vmo_get_size.md) -
* [vmo_get_stream_size](vmo_get_stream_size.md) -
* [vmo_op_range](vmo_op_range.md) -
* [vmo_read](vmo_read.md) - Read bytes from the VMO.
* [vmo_replace_as_executable](vmo_replace_as_executable.md) -
* [vmo_set_cache_policy](vmo_set_cache_policy.md) -
* [vmo_set_size](vmo_set_size.md) -
* [vmo_set_stream_size](vmo_set_stream_size.md) -
* [vmo_transfer_data](vmo_transfer_data.md) -
* [vmo_write](vmo_write.md) - Write bytes to the VMO.
## Virtual Memory Address Regions (VMARs)
* [vmar_allocate](vmar_allocate.md) - Allocate a new subregion.
* [vmar_destroy](vmar_destroy.md) - Destroy a virtual memory address region.
* [vmar_map](vmar_map.md) - Add a memory mapping.
* [vmar_map_clock](vmar_map_clock.md) - Map a kernel clock object's state.
* [vmar_map_iob](vmar_map_iob.md) - Map the memory regions attached to an IOBuffer. This call has
* [vmar_op_range](vmar_op_range.md) - Perform an operation on VMOs mapped into this VMAR.
* [vmar_protect](vmar_protect.md) - Set protection of virtual memory pages.
* [vmar_unmap](vmar_unmap.md) - Unmap virtual memory pages.
## Userspace Pagers
* [pager_create](pager_create.md) - Create a new pager object.
* [pager_create_vmo](pager_create_vmo.md) - Create a pager owned VMO.
* [pager_detach_vmo](pager_detach_vmo.md) - Detaches a VMO from a pager.
* [pager_op_range](pager_op_range.md) - Perform an operation on a range of a pager owned VMO.
* [pager_query_dirty_ranges](pager_query_dirty_ranges.md) - Query contiguous ranges of dirty pages in a pager owned VMO.
* [pager_query_vmo_stats](pager_query_vmo_stats.md) -
* [pager_supply_pages](pager_supply_pages.md) - Supply pages into a pager owned VMO.
## Cryptographically Secure RNG
* [cprng_add_entropy](cprng_add_entropy.md) - Add entropy to the kernel CPRNG.
* [cprng_draw](cprng_draw.md) - Draw from the kernel's CPRNG.
## Time
* [clock_create](clock_create.md) - Create a new clock object.
* [clock_get_boot](clock_get_boot.md) - Acquire the current boot time.
* [clock_get_details](clock_get_details.md) - Fetch all of the low level details of the clock's current state.
* [clock_get_details_mapped](clock_get_details_mapped.md) - Fetch all of the low level details of a mapped clock's current state. Behaves identically to
* [clock_get_monotonic](clock_get_monotonic.md) - Acquire the current monotonic time.
* [clock_read](clock_read.md) - Perform a basic read of the clock.
* [clock_read_mapped](clock_read_mapped.md) - Perform a basic read of a mapped clock's state. Behaves identically to a call to
* [clock_update](clock_update.md) - Make adjustments to a clock object.
* [deadline_after](deadline_after.md) - Convert a time relative to now to an absolute deadline.
* [nanosleep](nanosleep.md) - High resolution sleep.
* [ticks_get](ticks_get.md) - Read the number of high-precision timer ticks since boot, not including
* [ticks_get_boot](ticks_get_boot.md) - Read the number of high-precision timer ticks since boot, including any time spent in a
* [ticks_per_second](ticks_per_second.md) - Read the number of high-precision timer ticks in a second.
## Timers
* [timer_cancel](timer_cancel.md) - Cancel a timer.
* [timer_create](timer_create.md) - Create a timer.
* [timer_set](timer_set.md) - Start a timer.
## Message Signaled Interrupts (MSIs)
* [msi_allocate](msi_allocate.md) - Allocate Message-Signaled Interrupts (MSIs).
* [msi_create](msi_create.md) - Create an Interrupt object from a Messaged-Signaled Interrupt (MSI) allocation.
## Hypervisor guests
* [guest_create](guest_create.md) - Create a guest.
* [guest_set_trap](guest_set_trap.md) - Sets a trap within a guest.
## Virtual CPUs
* [vcpu_create](vcpu_create.md) - Create a VCPU.
* [vcpu_enter](vcpu_enter.md) - Enter a VCPU, causing it to resume execution.
* [vcpu_interrupt](vcpu_interrupt.md) - Raise an interrupt on a VCPU.
* [vcpu_kick](vcpu_kick.md) - Kick a VCPU, causing it to stop execution.
* [vcpu_read_state](vcpu_read_state.md) - Read the state of a VCPU.
* [vcpu_write_state](vcpu_write_state.md) - Write the state of a VCPU.
## Global system information
* [system_get_dcache_line_size](system_get_dcache_line_size.md) - TODO(https://fxbug.dev/42108078)
* [system_get_features](system_get_features.md) - Get supported hardware capabilities.
* [system_get_num_cpus](system_get_num_cpus.md) - Get number of logical processors on the system.
* [system_get_page_size](system_get_page_size.md) - Get the page size for the system.
* [system_get_physmem](system_get_physmem.md) - Get amount of physical memory on the system.
* [system_get_version_string](system_get_version_string.md) - Get version string for system.
## Debug Logging
* [debug_read](debug_read.md) - Read a message from the debug serial port.
* [debug_send_command](debug_send_command.md) - TODO(https://fxbug.dev/42108078)
* [debug_write](debug_write.md) - Write a message to the debug serial port.
* [debuglog_create](debuglog_create.md) - Create an object allowing access to the kernel debuglog.
* [debuglog_read](debuglog_read.md) - Read a single log record from the kernel debuglog.
* [debuglog_write](debuglog_write.md) - Write a message to the kernel debuglog.
## Multi-function
* [vmar_unmap_handle_close_thread_exit](vmar_unmap_handle_close_thread_exit.md) - Unmap memory, close handle, exit.
## System
* [system_barrier](system_barrier.md) - Issue a barrier on other running threads.
* [system_get_performance_info](system_get_performance_info.md) - Get CPU performance parameters.
* [system_mexec](system_mexec.md) - Soft reboot the system with a new kernel and bootimage.
* [system_mexec_payload_get](system_mexec_payload_get.md) - Return a ZBI containing ZBI entries necessary to boot this system.
* [system_powerctl](system_powerctl.md) - TODO(https://fxbug.dev/42108078)
* [system_set_performance_info](system_set_performance_info.md) - Set CPU performance parameters.
* [system_set_processor_power_domain](system_set_processor_power_domain.md) - Informs the kernel of the processor power levels within a given power
* [system_set_processor_power_state](system_set_processor_power_state.md) - Updates the current processor power level state as observed by the kernel.
* [system_suspend_enter](system_suspend_enter.md) -
* [system_watch_memory_stall](system_watch_memory_stall.md) - Retrieve an event that becomes signaled if the memory stall level
## Driver
* [bti_create](bti_create.md) - Create a new bus transaction initiator.
* [bti_pin](bti_pin.md) - Pin pages and grant devices access to them.
* [bti_release_quarantine](bti_release_quarantine.md) - Releases all quarantined PMTs.
* [cache_flush](cache_flush.md) - Flush CPU data and/or instruction caches.
* [interrupt_ack](interrupt_ack.md) - Acknowledge an interrupt and re-arm it.
* [interrupt_bind](interrupt_bind.md) - Bind an interrupt object to a port.
* [interrupt_create](interrupt_create.md) - Create an interrupt object.
* [interrupt_destroy](interrupt_destroy.md) - Destroys an interrupt object.
* [interrupt_trigger](interrupt_trigger.md) - Triggers a virtual interrupt object.
* [interrupt_wait](interrupt_wait.md) - Wait for an interrupt.
* [iommu_create](iommu_create.md) - Create a new IOMMU object in the kernel.
* [pmt_unpin](pmt_unpin.md) - Unpin pages and revoke device access to them.
* [resource_create](resource_create.md) - Create a resource object.
* [smc_call](smc_call.md) - Make Secure Monitor Call (SMC) from user space.
## Tracing
* [ktrace_control](ktrace_control.md) - TODO(https://fxbug.dev/42108078)
* [ktrace_read](ktrace_read.md) - TODO(https://fxbug.dev/42108078)
* [mtrace_control](mtrace_control.md) - TODO(https://fxbug.dev/42108078)
## Restricted Mode (Work in progress)
* [restricted_bind_state](restricted_bind_state.md) - Create and bind a restricted state VMO to the current thread.
* [restricted_enter](restricted_enter.md) - Enter restricted mode
* [restricted_kick](restricted_kick.md) - Kick a thread out of restricted mode.
* [restricted_unbind_state](restricted_unbind_state.md) - Unbind a restricted state VMO from the current thread.
## Others/Work in progress
* [ioports_release](ioports_release.md) - TODO(https://fxbug.dev/42108078)
* [ioports_request](ioports_request.md) - TODO(https://fxbug.dev/42108078)
* [pci_add_subtract_io_range](pci_add_subtract_io_range.md) - This function is obsolete and should not be used.
* [pci_cfg_pio_rw](pci_cfg_pio_rw.md) - This function is obsolete and should not be used.
* [pci_config_read](pci_config_read.md) - This function is obsolete and should not be used.
* [pci_config_write](pci_config_write.md) - This function is obsolete and should not be used.
* [pci_enable_bus_master](pci_enable_bus_master.md) - This function is obsolete and should not be used.
* [pci_get_bar](pci_get_bar.md) - This function is obsolete and should not be used.
* [pci_get_nth_device](pci_get_nth_device.md) - This function is obsolete and should not be used.
* [pci_init](pci_init.md) - This function is obsolete and should not be used.
* [pci_map_interrupt](pci_map_interrupt.md) - This function is obsolete and should not be used.
* [pci_query_irq_mode](pci_query_irq_mode.md) - This function is obsolete and should not be used.
* [pci_reset_device](pci_reset_device.md) - This function is obsolete and should not be used.
* [pci_set_irq_mode](pci_set_irq_mode.md) - This function is obsolete and should not be used.