bitops for handling 32 bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
Is there a kernel API for handling 32 bits ?
I see a macro like BIT(nr)
http://lxr.free-electrons.com/source/include/linux/bitops.h#L6

#define BIT(nr)                 (1UL << (nr))

and also
#define BIT_ULL(nr)             (1ULL << (nr))

However, these macros are using 64 bit semantics, so if I will use
them with 32 bits values
the results will  be wrong.

Any ideas ?

Regards,
Kevin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux