swab - swap bytes in 16-bit halfwords
#include <sys/sunddi.h> void swab(void *src, void *dst, size_t nbytes);
Architecture independent level 1 (DDI/DKI).
src
dst
nbytes
The swab() function copies the bytes in the buffer pointed to by src to the buffer pointer to by dst, swapping the order of adjacent bytes in half-word pairs as the copy proceeds. A total of nbytes bytes are copied, rounded down to the nearest half-word.
The swab() function can be called from user, interrupt, or kernel context.
Since swab() operates byte-by-byte, it can be used on non-aligned buffers.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |