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