Changeset 78ee8b0 in mainline


Ignore:
Timestamp:
2008-11-28T22:34:51Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a3b5831
Parents:
7905360
Message:

Add host2uintX_t_{le|be} macros to the kernel's byteorder.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/byteorder.h

    r7905360 r78ee8b0  
    5252#define uint64_t_be2host(n)             (n)
    5353
     54#define host2uint16_t_le(n)             uint16_t_byteorder_swap(n)
     55#define host2uint32_t_le(n)             uint32_t_byteorder_swap(n)
     56#define host2uint64_t_le(n)             uint64_t_byteorder_swap(n)
     57
     58#define host2uint16_t_be(n)             (n)
     59#define host2uint32_t_be(n)             (n)
     60#define host2uint64_t_be(n)             (n)
     61
    5462#else
    5563
     
    6169#define uint32_t_be2host(n)             uint32_t_byteorder_swap(n)
    6270#define uint64_t_be2host(n)             uint64_t_byteorder_swap(n)
     71
     72#define host2uint16_t_le(n)             (n)
     73#define host2uint32_t_le(n)             (n)
     74#define host2uint64_t_le(n)             (n)
     75
     76#define host2uint16_t_be(n)             uint16_t_byteorder_swap(n)
     77#define host2uint32_t_be(n)             uint32_t_byteorder_swap(n)
     78#define host2uint64_t_be(n)             uint64_t_byteorder_swap(n)
    6379
    6480#endif
Note: See TracChangeset for help on using the changeset viewer.