Subversion Repositories HelenOS-historic

Rev

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

Rev 820 Rev 822
Line 51... Line 51...
51
#define FRAME_OK        0   /* frame_alloc return status */
51
#define FRAME_OK        0   /* frame_alloc return status */
52
#define FRAME_NO_MEMORY     1   /* frame_alloc return status */
52
#define FRAME_NO_MEMORY     1   /* frame_alloc return status */
53
#define FRAME_ERROR     2   /* frame_alloc return status */
53
#define FRAME_ERROR     2   /* frame_alloc return status */
54
 
54
 
55
/* Return true if the interlvals overlap */
55
/* Return true if the interlvals overlap */
56
static inline int overlaps(__address s1,__address e1, __address s2, __address e2)
56
static inline int overlaps(__address s1,__address sz1, __address s2, __address sz2)
57
{
57
{
-
 
58
    __address e1 = s1+sz1;
-
 
59
    __address e2 = s2+sz2;
58
    if (s1 >= s2 && s1 < e2)
60
    if (s1 >= s2 && s1 < e2)
59
        return 1;
61
        return 1;
60
    if (e1 >= s2 && e1 < e2)
62
    if (e1 >= s2 && e1 < e2)
61
        return 1;
63
        return 1;
62
    if ((s1 < s2) && (e1 >= e2))
64
    if ((s1 < s2) && (e1 >= e2))
Line 93... Line 95...
93
 
95
 
94
extern void frame_init(void);
96
extern void frame_init(void);
95
__address frame_alloc_generic(__u8 order, int flags, int * status, int *pzone);
97
__address frame_alloc_generic(__u8 order, int flags, int * status, int *pzone);
96
extern void frame_free(__address addr);
98
extern void frame_free(__address addr);
97
 
99
 
98
extern void zone_create(pfn_t start, count_t count, pfn_t confframe, int flags);
100
extern int zone_create(pfn_t start, count_t count, pfn_t confframe, int flags);
99
 
-
 
100
void * frame_get_parent(pfn_t frame, int hint);
101
void * frame_get_parent(pfn_t frame, int hint);
101
void frame_set_parent(pfn_t frame, void *data, int hint);
102
void frame_set_parent(pfn_t frame, void *data, int hint);
102
void frame_mark_unavailable(pfn_t start, count_t count);
103
void frame_mark_unavailable(pfn_t start, count_t count);
103
__address zone_conf_size(pfn_t start, count_t count);
104
__address zone_conf_size(count_t count);
-
 
105
void zone_merge(int z1, int z2);
-
 
106
void zone_merge_all(void);
104
 
107
 
105
/*
108
/*
106
 * Console functions
109
 * Console functions
107
 */
110
 */
108
extern void zone_print_list(void);
111
extern void zone_print_list(void);