macOS#
System Configuration#
macOS is one of several supported platforms. xNVMe is likely to work on multiple versions of macOS, however to ensure compatibility we recommend using a version listed in the Toolchain section.
Device Identifiers#
macOS exposes NVMe devices as files using the following naming schemes:
/dev/disk{ctrlr_id}NVMe Controller device node
/path/to/fileA regular file, opened by the
emu_fileandthrpool_filebackend configs, and created when the open asks for it
Backend Configs#
The macOS platform provides the following backend configs. Some of these use
cross-platform
implementations, each in a directory of its own under lib/backend/. For
these, links point to the cross-platform section. For the macOS-specific
interfaces, descriptions are available in the corresponding subsections.
Memory Allocators
posix, Use libcmalloc()/free()withsysconf()for alignment, see Cross-platform implementations
Asynchronous Interfaces
emu, see Async. I/O via emuposix, see Async. I/O via posixthrpool, see Async. I/O via thrpool
Synchronous Interfaces
macos, Use pread()/write() for synchronous I/Opsync, Use pread()/write() on a regular file, see Sync. I/O via psync
Admin Interfaces
macos, Use macOS NVMe SMART Interface admin commandsfile_as_ns, Answer admin commands for a regular file as a namespace
Device Interfaces
macos, Use macOS file/dev handles and enumerate NVMe devices