Changeset 0f3fc9b in mainline for kernel/generic/include/mm/buddy.h


Ignore:
Timestamp:
2007-01-22T13:34:55Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
726e1043
Parents:
e7b7be3f
Message:

typedef elimination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/mm/buddy.h

    re7b7be3f r0f3fc9b  
    4141#define BUDDY_SYSTEM_INNER_BLOCK        0xff
    4242
     43struct buddy_system;
     44
    4345/** Buddy system operations to be implemented by each implementation. */
    44 struct buddy_system_operations {
     46typedef struct {
    4547        /** Return pointer to left-side or right-side buddy for block passed as
    4648          * argument. */
    47         link_t *(* find_buddy)(buddy_system_t *, link_t *);
     49        link_t *(* find_buddy)(struct buddy_system *, link_t *);
    4850        /** Bisect the block passed as argument and return pointer to the new
    4951          * right-side buddy. */
    50         link_t *(* bisect)(buddy_system_t *, link_t *);
     52        link_t *(* bisect)(struct buddy_system *, link_t *);
    5153        /** Coalesce two buddies into a bigger block. */
    52         link_t *(* coalesce)(buddy_system_t *, link_t *, link_t *);
     54        link_t *(* coalesce)(struct buddy_system *, link_t *, link_t *);
    5355        /** Set order of block passed as argument. */
    54         void (*set_order)(buddy_system_t *, link_t *, uint8_t);
     56        void (*set_order)(struct buddy_system *, link_t *, uint8_t);
    5557        /** Return order of block passed as argument. */
    56         uint8_t (*get_order)(buddy_system_t *, link_t *);
     58        uint8_t (*get_order)(struct buddy_system *, link_t *);
    5759        /** Mark block as busy. */
    58         void (*mark_busy)(buddy_system_t *, link_t *);
     60        void (*mark_busy)(struct buddy_system *, link_t *);
    5961        /** Mark block as available. */
    60         void (*mark_available)(buddy_system_t *, link_t *);
     62        void (*mark_available)(struct buddy_system *, link_t *);
    6163        /** Find parent of block that has given order  */
    62         link_t *(* find_block)(buddy_system_t *, link_t *, uint8_t);
    63         void (* print_id)(buddy_system_t *, link_t *);
    64 };
     64        link_t *(* find_block)(struct buddy_system *, link_t *, uint8_t);
     65        void (* print_id)(struct buddy_system *, link_t *);
     66} buddy_system_operations_t;
    6567
    66 struct buddy_system {
     68typedef struct buddy_system {
    6769        /** Maximal order of block which can be stored by buddy system. */
    6870        uint8_t max_order;
     
    7173        /** Pointer to be used by the implementation. */
    7274        void *data;
    73 };
     75} buddy_system_t;
    7476
    7577extern void buddy_system_create(buddy_system_t *b, uint8_t max_order,
Note: See TracChangeset for help on using the changeset viewer.