Ignore:
File:
1 edited

Legend:

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

    rda1bafb ra000878c  
    8484} slab_mag_cache_t;
    8585
     86
    8687typedef struct {
    8788        const char *name;
     
    9394        size_t size;
    9495       
    95         int (*constructor)(void *obj, unsigned int kmflag);
    96         size_t (*destructor)(void *obj);
     96        int (*constructor)(void *obj, int kmflag);
     97        int (*destructor)(void *obj);
    9798       
    9899        /** Flags changing behaviour of cache */
    99         unsigned int flags;
     100        int flags;
    100101       
    101102        /* Computed values */
    102         uint8_t order;   /**< Order of frames to be allocated */
    103         size_t objects;  /**< Number of objects that fit in */
     103        uint8_t order;         /**< Order of frames to be allocated */
     104        unsigned int objects;  /**< Number of objects that fit in */
    104105       
    105106        /* Statistics */
     
    108109        atomic_t cached_objs;
    109110        /** How many magazines in magazines list */
    110         atomic_t magazine_counter;
     111        atomic_t magazine_counter; 
    111112       
    112113        /* Slabs */
     
    123124
    124125extern slab_cache_t *slab_cache_create(const char *, size_t, size_t,
    125     int (*)(void *, unsigned int), size_t (*)(void *), unsigned int);
     126    int (*)(void *, int), int (*)(void *), int);
    126127extern void slab_cache_destroy(slab_cache_t *);
    127128
    128 extern void * slab_alloc(slab_cache_t *, unsigned int);
     129extern void * slab_alloc(slab_cache_t *, int);
    129130extern void slab_free(slab_cache_t *, void *);
    130 extern size_t slab_reclaim(unsigned int);
     131extern size_t slab_reclaim(int);
    131132
    132133/* slab subsytem initialization */
     
    138139
    139140/* malloc support */
    140 extern void *malloc(size_t, unsigned int);
    141 extern void *realloc(void *, size_t, unsigned int);
     141extern void *malloc(unsigned int, int);
     142extern void *realloc(void *, unsigned int, int);
    142143extern void free(void *);
    143144
Note: See TracChangeset for help on using the changeset viewer.