Subversion Repositories HelenOS-historic

Rev

Rev 822 | Rev 946 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 822 Rev 827
Line 55... Line 55...
55
/* Return true if the interlvals overlap */
55
/* Return true if the interlvals overlap */
56
static inline int overlaps(__address s1,__address sz1, __address s2, __address sz2)
56
static inline int overlaps(__address s1,__address sz1, __address s2, __address sz2)
57
{
57
{
58
    __address e1 = s1+sz1;
58
    __address e1 = s1+sz1;
59
    __address e2 = s2+sz2;
59
    __address e2 = s2+sz2;
60
    if (s1 >= s2 && s1 < e2)
-
 
61
        return 1;
60
 
62
    if (e1 >= s2 && e1 < e2)
61
    return s1 < e2 && s2 < e1;
63
        return 1;
-
 
64
    if ((s1 < s2) && (e1 >= e2))
-
 
65
        return 1;
-
 
66
    return 0;
-
 
67
}
62
}
68
 
63
 
69
static inline __address PFN2ADDR(pfn_t frame)
64
static inline __address PFN2ADDR(pfn_t frame)
70
{
65
{
71
    return (__address)(frame << FRAME_WIDTH);
66
    return (__address)(frame << FRAME_WIDTH);