Subversion Repositories HelenOS

Rev

Rev 2089 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2089 Rev 2106
Line 42... Line 42...
42
 
42
 
43
struct buddy_system;
43
struct buddy_system;
44
 
44
 
45
/** Buddy system operations to be implemented by each implementation. */
45
/** Buddy system operations to be implemented by each implementation. */
46
typedef struct {
46
typedef struct {
-
 
47
    /**
47
    /** Return pointer to left-side or right-side buddy for block passed as
48
     * Return pointer to left-side or right-side buddy for block passed as
48
      * argument. */
49
     * argument.
-
 
50
     */
49
    link_t *(* find_buddy)(struct buddy_system *, link_t *);
51
    link_t *(* find_buddy)(struct buddy_system *, link_t *);
-
 
52
    /**
50
    /** Bisect the block passed as argument and return pointer to the new
53
     * Bisect the block passed as argument and return pointer to the new
51
      * right-side buddy. */
54
     * right-side buddy.
-
 
55
     */
52
    link_t *(* bisect)(struct buddy_system *, link_t *);
56
    link_t *(* bisect)(struct buddy_system *, link_t *);
53
    /** Coalesce two buddies into a bigger block. */
57
    /** Coalesce two buddies into a bigger block. */
54
    link_t *(* coalesce)(struct buddy_system *, link_t *, link_t *);
58
    link_t *(* coalesce)(struct buddy_system *, link_t *, link_t *);
55
    /** Set order of block passed as argument. */
59
    /** Set order of block passed as argument. */
56
    void (*set_order)(struct buddy_system *, link_t *, uint8_t);
60
    void (*set_order)(struct buddy_system *, link_t *, uint8_t);