This HTML automatically generated with rman for NEMO
Table of Contents

Name

bswap, bswap_litend, bswap_bigend - (endian dependant) byte swapping

Synopsis


void bswap(void *data, int len, int cnt)void bswap_litend(void *data, int
len, int cnt)void bswap_bigend(void *data, int len, int cnt)

Description

bswap swaps the bytes in a word of length len, and does this cnt times. For len=2,4,8 special optimized versions are written (see also htonl(3) and htons(3) ). bswap_litend and bswap_bigend are specific implementations that swap the bytes to the native machine level, assuming data is little resp. big endian. These two routines could thus result in a no-op.

Examples

The following code ...
    real x[100], w[100];
    int  i,n=100;
    ...

See Also

bswap(1NEMO) , htonl(3) , htons(3) , ntohl(3) , ntohs(3)

Author

Peter Teuben

Files


~/src/kernel/cores    bswap.c

Update History


20-sep-05    man written    PJT


Table of Contents