Changeset 98000fb in mainline for kernel/generic/include/mm


Ignore:
Timestamp:
2009-06-03T19:34:45Z (16 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)

Location:
kernel/generic/include/mm
Files:
4 edited

Legend:

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

    r69e68e3 r98000fb  
    9595         * Protected by asidlock.
    9696         */
    97         count_t cpu_refcount;
     97        size_t cpu_refcount;
    9898        /**
    9999         * Address space identifier.
     
    133133        mutex_t lock;           
    134134        /** This structure can be deallocated if refcount drops to 0. */
    135         count_t refcount;
     135        size_t refcount;
    136136        /**
    137137         * B+tree containing complete map of anonymous pages of the shared area.
     
    157157        struct {        /**< phys_backend members */
    158158                uintptr_t base;
    159                 count_t frames;
     159                size_t frames;
    160160        };
    161161} mem_backend_data_t;
     
    176176        int attributes;
    177177        /** Size of this area in multiples of PAGE_SIZE. */
    178         count_t pages;
     178        size_t pages;
    179179        /** Base address of this area. */
    180180        uintptr_t base;
     
    226226extern bool as_area_check_access(as_area_t *area, pf_access_t access);
    227227extern size_t as_area_get_size(uintptr_t base);
    228 extern int used_space_insert(as_area_t *a, uintptr_t page, count_t count);
    229 extern int used_space_remove(as_area_t *a, uintptr_t page, count_t count);
     228extern int used_space_insert(as_area_t *a, uintptr_t page, size_t count);
     229extern int used_space_remove(as_area_t *a, uintptr_t page, size_t count);
    230230
    231231
  • 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
  • kernel/generic/include/mm/slab.h

    r69e68e3 r98000fb  
    7373typedef struct {
    7474        link_t link;
    75         count_t busy;  /**< Count of full slots in magazine */
    76         count_t size;  /**< Number of slots in magazine */
     75        size_t busy;  /**< Count of full slots in magazine */
     76        size_t size;  /**< Number of slots in magazine */
    7777        void *objs[];  /**< Slots in magazine */
    7878} slab_magazine_t;
     
    129129extern void * slab_alloc(slab_cache_t *, int);
    130130extern void slab_free(slab_cache_t *, void *);
    131 extern count_t slab_reclaim(int);
     131extern size_t slab_reclaim(int);
    132132
    133133/* slab subsytem initialization */
  • kernel/generic/include/mm/tlb.h

    r69e68e3 r98000fb  
    6262        asid_t asid;                    /**< Address space identifier. */
    6363        uintptr_t page;                 /**< Page address. */
    64         count_t count;                  /**< Number of pages to invalidate. */
     64        size_t count;                   /**< Number of pages to invalidate. */
    6565} tlb_shootdown_msg_t;
    6666
     
    6969#ifdef CONFIG_SMP
    7070extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,
    71     uintptr_t page, count_t count);
     71    uintptr_t page, size_t count);
    7272extern void tlb_shootdown_finalize(void);
    7373extern void tlb_shootdown_ipi_recv(void);
     
    8585extern void tlb_invalidate_all(void);
    8686extern void tlb_invalidate_asid(asid_t asid);
    87 extern void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt);
     87extern void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt);
    8888#endif
    8989
Note: See TracChangeset for help on using the changeset viewer.