Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 813 → Rev 814

/kernel/trunk/generic/include/mm/buddy.h
42,6 → 42,9
void (*set_order)(buddy_system_t *, link_t *, __u8); /**< Set order of block passed as argument. */
__u8 (*get_order)(buddy_system_t *, link_t *); /**< Return order of block passed as argument. */
void (*mark_busy)(buddy_system_t *, link_t *); /**< Mark block as busy */
void (*mark_available)(buddy_system_t *, link_t *); /**< Mark block as busy */
/** Find parent of block that has given order */
link_t *(* find_block)(buddy_system_t *, link_t *, __u8);
};
 
struct buddy_system {
51,10 → 54,14
void *data; /**< Pointer to be used by the implementation. */
};
 
extern buddy_system_t *buddy_system_create(__u8 max_order, buddy_system_operations_t *op, void *data);
extern void buddy_system_create(buddy_system_t *b,
__u8 max_order,
buddy_system_operations_t *op, void *data);
extern link_t *buddy_system_alloc(buddy_system_t *b, __u8 i);
extern bool buddy_system_can_alloc(buddy_system_t *b, __u8 order);
extern void buddy_system_free(buddy_system_t *b, link_t *block);
extern void buddy_system_structure_print(buddy_system_t *b, size_t elem_size);
extern size_t buddy_conf_size(int max_order);
extern link_t *buddy_system_alloc_block(buddy_system_t *b, link_t *block);
 
#endif