Subversion Repositories HelenOS

Rev

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

Rev 2725 Rev 3228
Line 46... Line 46...
46
                ((c) == '\r'))
46
                ((c) == '\r'))
47
 
47
 
48
#define min(a,b)    ((a) < (b) ? (a) : (b))
48
#define min(a,b)    ((a) < (b) ? (a) : (b))
49
#define max(a,b)    ((a) > (b) ? (a) : (b))
49
#define max(a,b)    ((a) > (b) ? (a) : (b))
50
 
50
 
51
/** Return true if the interlvals overlap.
51
/** Return true if the intervals overlap.
52
 *
52
 *
53
 * @param s1 Start address of the first interval.
53
 * @param s1 Start address of the first interval.
54
 * @param sz1 Size of the first interval.
54
 * @param sz1 Size of the first interval.
55
 * @param s2 Start address of the second interval.
55
 * @param s2 Start address of the second interval.
56
 * @param sz2 Size of the second interval.
56
 * @param sz2 Size of the second interval.
Line 67... Line 67...
67
#define PA_overlaps(x, szx, y, szy) overlaps(KA2PA(x), szx, KA2PA(y), szy)
67
#define PA_overlaps(x, szx, y, szy) overlaps(KA2PA(x), szx, KA2PA(y), szy)
68
 
68
 
69
#define SIZE2KB(size) (size >> 10)
69
#define SIZE2KB(size) (size >> 10)
70
#define SIZE2MB(size) (size >> 20)
70
#define SIZE2MB(size) (size >> 20)
71
 
71
 
-
 
72
#define KB2SIZE(size) (size << 10)
-
 
73
#define MB2SIZE(size) (size << 20)
-
 
74
 
72
#define STRING(arg) STRING_ARG(arg)
75
#define STRING(arg) STRING_ARG(arg)
73
#define STRING_ARG(arg) #arg
76
#define STRING_ARG(arg) #arg
74
 
77
 
75
#endif
78
#endif
76
 
79