Changes in kernel/generic/include/macros.h [933cadf:33ca0f5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/macros.h
r933cadf r33ca0f5 69 69 uint64_t sz2) 70 70 { 71 uint64_t e1 = s1 + sz1; 72 uint64_t e2 = s2 + sz2; 73 71 uint64_t e1; 72 uint64_t e2; 73 74 /* Handle the two corner cases when either sz1 or sz2 are zero. */ 75 if (sz1 == 0) 76 return (s1 == s2) && (sz2 == 0); 77 e1 = s1 + sz1 - 1; 78 if (sz2 == 0) 79 return (s1 <= s2) && (s2 <= e1); 80 e2 = s2 + sz2 - 1; 81 82 /* e1 and e2 are end addresses, the sum is imune to overflow */ 74 83 return ((s1 <= s2) && (e1 >= e2)); 75 84 } 76 85 77 86 #endif /* __ASM__ */ 87 88 #define ispwr2(x) (((x) & ((x) - 1)) == 0) 78 89 79 90 #define isdigit(d) (((d) >= '0') && ((d) <= '9'))
Note:
See TracChangeset
for help on using the changeset viewer.