Changeset 3823
- Timestamp:
- 07/24/08 04:05:54 (6 months ago)
- Files:
-
- madwifi/trunk/include/compat.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
madwifi/trunk/include/compat.h
r3771 r3823 91 91 #define howmany(x, y) (((x)+((y)-1))/(y)) 92 92 93 /* roundup() and howmany() macros that works both with positive and negative 94 * values. */ 95 #define roundup_s(x,y) _roundup_s((signed)(x),(signed)(y)) 96 #define howmany_s(x,y) _howmany_s((signed)(x),(signed)(y)) 97 #define _roundup_s(x,y) \ 98 ((x) >= 0 ? (((x)+((y)-1))/(y))*(y) : ((x)/(y))*(y)) 99 #define _howmany_s(x, y) \ 100 ((x) >= 0 ? (((x)+((y)-1))/(y)) : ((x)/(y))) 101 93 102 /* Bit map related macros. */ 94 103 #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
