Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/virtio/virtio_endian.h
Show All 26 Lines | |||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _VIRTIO_ENDIAN_H_ | #ifndef _VIRTIO_ENDIAN_H_ | ||||
#define _VIRTIO_ENDIAN_H_ | #define _VIRTIO_ENDIAN_H_ | ||||
#include <sys/endian.h> | #include <sys/endian.h> | ||||
#ifndef _KERNEL | |||||
#include <stdbool.h> | |||||
#endif /* _KERNEL */ | |||||
/* | /* | ||||
* VirtIO V1 (modern) uses little endian, while legacy VirtIO uses the guest's | * VirtIO V1 (modern) uses little endian, while legacy VirtIO uses the guest's | ||||
* native endian. These functions convert to and from the Guest's (driver's) | * native endian. These functions convert to and from the Guest's (driver's) | ||||
* and the Host's (device's) endianness when needed. | * and the Host's (device's) endianness when needed. | ||||
*/ | */ | ||||
static inline bool | static inline bool | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |