Rev 946 | Rev 1138 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 946 | Rev 1063 | ||
|---|---|---|---|
| Line 59... | Line 59... | ||
| 59 | 59 | ||
| 60 | #define FRAME_OK 0 /* frame_alloc return status */ |
60 | #define FRAME_OK 0 /* frame_alloc return status */ |
| 61 | #define FRAME_NO_MEMORY 1 /* frame_alloc return status */ |
61 | #define FRAME_NO_MEMORY 1 /* frame_alloc return status */ |
| 62 | #define FRAME_ERROR 2 /* frame_alloc return status */ |
62 | #define FRAME_ERROR 2 /* frame_alloc return status */ |
| 63 | 63 | ||
| 64 | /* Return true if the interlvals overlap */ |
- | |
| 65 | static inline int overlaps(__address s1,__address sz1, __address s2, __address sz2) |
- | |
| 66 | { |
- | |
| 67 | __address e1 = s1+sz1; |
- | |
| 68 | __address e2 = s2+sz2; |
- | |
| 69 | - | ||
| 70 | return s1 < e2 && s2 < e1; |
- | |
| 71 | } |
- | |
| 72 | - | ||
| 73 | static inline __address PFN2ADDR(pfn_t frame) |
64 | static inline __address PFN2ADDR(pfn_t frame) |
| 74 | { |
65 | { |
| 75 | return (__address)(frame << FRAME_WIDTH); |
66 | return (__address)(frame << FRAME_WIDTH); |
| 76 | } |
67 | } |
| 77 | 68 | ||