Subversion Repositories HelenOS-historic

Rev

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

Rev 534 Rev 1063
Line 37... Line 37...
37
#define is_white(c) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r'))
37
#define is_white(c) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r'))
38
 
38
 
39
#define min(a,b)    ((a)<(b)?(a):(b))
39
#define min(a,b)    ((a)<(b)?(a):(b))
40
#define max(a,b)    ((a)>(b)?(a):(b))
40
#define max(a,b)    ((a)>(b)?(a):(b))
41
 
41
 
-
 
42
/* Return true if the interlvals overlap */
-
 
43
static inline int overlaps(__address s1,size_t sz1, __address s2, size_t sz2)
-
 
44
{
-
 
45
    __address e1 = s1+sz1;
-
 
46
    __address e2 = s2+sz2;
-
 
47
 
-
 
48
    return s1 < e2 && s2 < e1;
-
 
49
}
-
 
50
/* Compute overlapping of physical addresses */
-
 
51
#define PA_overlaps(x,szx,y,szy)  overlaps(KA2PA(x),szx,KA2PA(y), szy)
-
 
52
 
42
#endif
53
#endif