SASC
DVBSoftCAM

unaligned.h File Reference

Go to the source code of this file.

Defines

#define get_unaligned(ptr)   (*(ptr))
#define put_unaligned(val, ptr)   ((void)( *(ptr) = (val) ))

Define Documentation

#define get_unaligned (   ptr)    (*(ptr))

get_unaligned - get value from possibly mis-aligned location : pointer to value

This macro should be used for accessing values larger in size than single bytes at locations that are expected to be improperly aligned, e.g. retrieving a u16 value from a location not u16-aligned.

Note that unaligned accesses can be very expensive on some architectures.

Definition at line 22 of file unaligned.h.

#define put_unaligned (   val,
  ptr 
)    ((void)( *(ptr) = (val) ))

put_unaligned - put value to a possibly mis-aligned location : value to place : pointer to location

This macro should be used for placing values larger in size than single bytes at locations that are expected to be improperly aligned, e.g. writing a u16 value to a location not u16-aligned.

Note that unaligned accesses can be very expensive on some architectures.

Definition at line 35 of file unaligned.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines