#include <mach/upl.h>

mach/upl.h Kernel.framework

includes: Kernel/string.h, Kernel/mach/ndr.h, Kernel/mach/boolean.h, Kernel/mach/kern_return.h, Kernel/mach/notify.h, mach/mach_types.h, mach/message.h, Kernel/mach/mig_errors.h, mach/port.h, Availability.h, Kernel/mach/std_types.h, Kernel/mach/mig.h, Kernel/mach/mig.h, mach/mach_types.h, sys/cdefs.h
4 functions · 3 macros

macro_upl_user_

#define _upl_user_ 

macroupl_MSG_COUNT

#define upl_MSG_COUNT 4

functionupl_abort

extern kern_return_t upl_abort(upl_t upl_object, integer_t abort_cond)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/vm/vm_upl.c
Aborts every page of the UPL, equivalent to upl_abort_range over the UPL's full extent. abort_cond carries UPL_ABORT_* flags describing the failure disposition (UPL_ABORT_ERROR, UPL_ABORT_DUMP_PAGES, UPL_ABORT_RESTART, ...). Returns KERN_INVALID_ARGUMENT if the UPL is null.

functionupl_abort_range

extern kern_return_t upl_abort_range(
	upl_t upl_object,
	upl_offset_t offset,
	upl_size_t size,
	integer_t abort_cond,
	boolean_t *empty
)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/vm/vm_upl.c
Aborts the given byte range of the UPL after a failed or abandoned I/O: the covered pages are unbusied and disposed of according to the UPL_ABORT_* flags in abort_cond (UPL_ABORT_DUMP_PAGES frees them, UPL_ABORT_ERROR marks the object in error, UPL_ABORT_RESTART/UPL_ABORT_UNAVAILABLE control page state). For I/O-wired UPLs without UPL_ABORT_DUMP_PAGES the call is converted to upl_commit_range with UPL_COMMIT_FREE_ABSENT. *empty is set TRUE when the entire UPL has been processed; with UPL_ABORT_FREE_ON_EMPTY the UPL is also deallocated, saving a call to upl_deallocate. Returns KERN_INVALID_ARGUMENT for a null UPL, KERN_FAILURE for a range beyond the UPL's extent.

functionupl_commit

extern kern_return_t upl_commit(
	upl_t upl_object,
	upl_page_info_array_t page_list,
	mach_msg_type_number_t page_listCnt
)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/vm/vm_upl.c
Commits every page of the UPL, equivalent to upl_commit_range over the UPL's full extent with no flags; page_list (with page_listCnt entries) optionally supplies per-page state gathered when the UPL was created. Returns KERN_INVALID_ARGUMENT if the UPL is null.

functionupl_commit_range

extern kern_return_t upl_commit_range(
	upl_t upl_object,
	upl_offset_t offset,
	upl_size_t size,
	integer_t cntrl_flags,
	upl_page_info_array_t page_list,
	mach_msg_type_number_t page_listCnt,
	boolean_t *empty
)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/vm/vm_upl.c
Commits the given byte range of the UPL after successful completion of the I/O or other operation it was created for: covered pages are unbusied, wired counts dropped for I/O-wired UPLs, and dirty/precious state updated per the UPL_COMMIT_* flags (UPL_COMMIT_CLEAR_DIRTY, UPL_COMMIT_SET_DIRTY, UPL_COMMIT_FREE_ABSENT, UPL_COMMIT_INACTIVATE, ...) and the optional page_list information. *empty is set TRUE when the whole UPL has been committed; with UPL_COMMIT_FREE_ON_EMPTY it is then deallocated automatically. Returns KERN_INVALID_ARGUMENT for a null UPL, KERN_FAILURE for a range beyond the UPL's extent.

macrosubsystem_to_name_map_upl

#define subsystem_to_name_map_upl { "upl_abort", 2050 },
    { "upl_abort_range", 2051 },
    { "upl_commit", 2052 },
    { "upl_commit_range", 2053 }