Changeset e2d48f5 in rtems-libbsd


Ignore:
Timestamp:
May 19, 2017, 7:31:15 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
647dd08ae2aa69b935c2847ea450fb824322ecae, c6261f97870562d4c797cfb1ff1ba0affb85a916
Children:
1908686
Parents:
7f1f428
git-author:
Sebastian Huber <sebastian.huber@…> (05/19/17 07:31:15)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/23/17 07:24:06)
Message:

dpaa: Implement GENMASK() similar to Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/powerpc/include/linux/bitops.h

    r7f1f428 re2d48f5  
    4646#define BIT_MASK(nr)            (1UL << ((nr) & (BITS_PER_LONG - 1)))
    4747#define BIT_WORD(nr)            ((nr) / BITS_PER_LONG)
    48 #define GENMASK(hi, lo)         (((2UL << ((hi) - (lo))) - 1UL) << (lo))
     48#define GENMASK(hi, lo)         (((~0UL) << (lo)) & (~0UL >> (BITS_PER_LONG - 1 - (hi))))
    4949#define BITS_PER_BYTE           8
    5050
Note: See TracChangeset for help on using the changeset viewer.