Rev 624 | Rev 676 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 624 | Rev 629 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | #define FRAME_INDEX_VALID(zone, index) (((index) >= 0) && ((index) < ((zone)->free_count + (zone)->busy_count))) |
47 | #define FRAME_INDEX_VALID(zone, index) (((index) >= 0) && ((index) < ((zone)->free_count + (zone)->busy_count))) |
48 | #define IS_BUDDY_ORDER_OK(index, order) ((~(((__native) -1) << (order)) & (index)) == 0) |
48 | #define IS_BUDDY_ORDER_OK(index, order) ((~(((__native) -1) << (order)) & (index)) == 0) |
49 | #define IS_BUDDY_LEFT_BLOCK(zone, frame) (((FRAME_INDEX((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0) |
49 | #define IS_BUDDY_LEFT_BLOCK(zone, frame) (((FRAME_INDEX((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0) |
50 | #define IS_BUDDY_RIGHT_BLOCK(zone, frame) (((FRAME_INDEX((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1) |
50 | #define IS_BUDDY_RIGHT_BLOCK(zone, frame) (((FRAME_INDEX((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1) |
51 | 51 | ||
52 | #define ZONE_BLACKLIST_SIZE 3 |
52 | #define ZONE_BLACKLIST_SIZE 4 |
53 | 53 | ||
54 | struct zone { |
54 | struct zone { |
55 | link_t link; /**< link to previous and next zone */ |
55 | link_t link; /**< link to previous and next zone */ |
56 | 56 | ||
57 | SPINLOCK_DECLARE(lock); /**< this lock protects everything below */ |
57 | SPINLOCK_DECLARE(lock); /**< this lock protects everything below */ |