~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/swab.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _LINUX_SWAB_H
  3 #define _LINUX_SWAB_H
  4 
  5 #include <uapi/linux/swab.h>
  6 
  7 # define swab16 __swab16
  8 # define swab32 __swab32
  9 # define swab64 __swab64
 10 # define swab __swab
 11 # define swahw32 __swahw32
 12 # define swahb32 __swahb32
 13 # define swab16p __swab16p
 14 # define swab32p __swab32p
 15 # define swab64p __swab64p
 16 # define swahw32p __swahw32p
 17 # define swahb32p __swahb32p
 18 # define swab16s __swab16s
 19 # define swab32s __swab32s
 20 # define swab64s __swab64s
 21 # define swahw32s __swahw32s
 22 # define swahb32s __swahb32s
 23 
 24 static inline void swab16_array(u16 *buf, unsigned int words)
 25 {
 26         while (words--) {
 27                 swab16s(buf);
 28                 buf++;
 29         }
 30 }
 31 
 32 static inline void swab32_array(u32 *buf, unsigned int words)
 33 {
 34         while (words--) {
 35                 swab32s(buf);
 36                 buf++;
 37         }
 38 }
 39 
 40 static inline void swab64_array(u64 *buf, unsigned int words)
 41 {
 42         while (words--) {
 43                 swab64s(buf);
 44                 buf++;
 45         }
 46 }
 47 
 48 #endif /* _LINUX_SWAB_H */
 49 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php