Changeset 860a7bb in mainline
- Timestamp:
- 2013-11-12T15:28:42Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9d1be7b
- Parents:
- cb2739a
- Location:
- uspace/lib/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/bitops.c
rcb2739a r860a7bb 44 44 } 45 45 46 int __popcountdi2(long a) 47 { 48 int bits = 0; 49 for (unsigned int i = 0; i < sizeof(a) * 8; i++) { 50 if (((a >> i) & 1) != 0) { 51 bits++; 52 } 53 } 54 return bits; 55 } 46 56 47 57 /** @} -
uspace/lib/c/include/bitops.h
rcb2739a r860a7bb 108 108 109 109 extern int __popcountsi2(int); 110 extern int __popcountdi2(long); 110 111 111 112 #endif
Note:
See TracChangeset
for help on using the changeset viewer.