Changeset 98000fb in mainline for kernel/generic/include/mm/frame.h


Ignore:
Timestamp:
2009-06-03T19:34:45Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
301ff30
Parents:
69e68e3
Message:

remove redundant index_t and count_t types (which were always quite ambiguous and not actually needed)

File:
1 edited

Legend:

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

    r69e68e3 r98000fb  
    8181
    8282typedef struct {
    83         count_t refcount;     /**< Tracking of shared frames */
     83        size_t refcount;     /**< Tracking of shared frames */
    8484        uint8_t buddy_order;  /**< Buddy system block order */
    8585        link_t buddy_link;    /**< Link to the next free block inside
     
    9191        pfn_t base;                    /**< Frame_no of the first frame
    9292                                        in the frames array */
    93         count_t count;                 /**< Size of zone */
    94         count_t free_count;            /**< Number of free frame_t
     93        size_t count;                 /**< Size of zone */
     94        size_t free_count;            /**< Number of free frame_t
    9595                                        structures */
    96         count_t busy_count;            /**< Number of busy frame_t
     96        size_t busy_count;            /**< Number of busy frame_t
    9797                                        structures */
    9898        zone_flags_t flags;            /**< Type of the zone */
     
    109109typedef struct {
    110110        SPINLOCK_DECLARE(lock);
    111         count_t count;
     111        size_t count;
    112112        zone_t info[ZONES_MAX];
    113113} zones_t;
     
    125125}
    126126
    127 static inline count_t SIZE2FRAMES(size_t size)
     127static inline size_t SIZE2FRAMES(size_t size)
    128128{
    129129        if (!size)
    130130                return 0;
    131         return (count_t) ((size - 1) >> FRAME_WIDTH) + 1;
     131        return (size_t) ((size - 1) >> FRAME_WIDTH) + 1;
    132132}
    133133
    134 static inline size_t FRAMES2SIZE(count_t frames)
     134static inline size_t FRAMES2SIZE(size_t frames)
    135135{
    136136        return (size_t) (frames << FRAME_WIDTH);
     
    157157
    158158extern void frame_init(void);
    159 extern void *frame_alloc_generic(uint8_t, frame_flags_t, count_t *);
     159extern void *frame_alloc_generic(uint8_t, frame_flags_t, size_t *);
    160160extern void frame_free(uintptr_t);
    161161extern void frame_reference_add(pfn_t);
    162162
    163 extern count_t find_zone(pfn_t frame, count_t count, count_t hint);
    164 extern count_t zone_create(pfn_t, count_t, pfn_t, zone_flags_t);
    165 extern void *frame_get_parent(pfn_t, count_t);
    166 extern void frame_set_parent(pfn_t, void *, count_t);
    167 extern void frame_mark_unavailable(pfn_t, count_t);
    168 extern uintptr_t zone_conf_size(count_t);
    169 extern bool zone_merge(count_t, count_t);
     163extern size_t find_zone(pfn_t frame, size_t count, size_t hint);
     164extern size_t zone_create(pfn_t, size_t, pfn_t, zone_flags_t);
     165extern void *frame_get_parent(pfn_t, size_t);
     166extern void frame_set_parent(pfn_t, void *, size_t);
     167extern void frame_mark_unavailable(pfn_t, size_t);
     168extern uintptr_t zone_conf_size(size_t);
     169extern bool zone_merge(size_t, size_t);
    170170extern void zone_merge_all(void);
    171171extern uint64_t zone_total_size(void);
     
    175175 */
    176176extern void zone_print_list(void);
    177 extern void zone_print_one(count_t);
     177extern void zone_print_one(size_t);
    178178
    179179#endif
Note: See TracChangeset for help on using the changeset viewer.