Ignore:
File:
1 edited

Legend:

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

    ra000878c rda1bafb  
    8484} slab_mag_cache_t;
    8585
    86 
    8786typedef struct {
    8887        const char *name;
     
    9493        size_t size;
    9594       
    96         int (*constructor)(void *obj, int kmflag);
    97         int (*destructor)(void *obj);
     95        int (*constructor)(void *obj, unsigned int kmflag);
     96        size_t (*destructor)(void *obj);
    9897       
    9998        /** Flags changing behaviour of cache */
    100         int flags;
     99        unsigned int flags;
    101100       
    102101        /* Computed values */
    103         uint8_t order;         /**< Order of frames to be allocated */
    104         unsigned int objects;  /**< Number of objects that fit in */
     102        uint8_t order;   /**< Order of frames to be allocated */
     103        size_t objects;  /**< Number of objects that fit in */
    105104       
    106105        /* Statistics */
     
    109108        atomic_t cached_objs;
    110109        /** How many magazines in magazines list */
    111         atomic_t magazine_counter; 
     110        atomic_t magazine_counter;
    112111       
    113112        /* Slabs */
     
    124123
    125124extern slab_cache_t *slab_cache_create(const char *, size_t, size_t,
    126     int (*)(void *, int), int (*)(void *), int);
     125    int (*)(void *, unsigned int), size_t (*)(void *), unsigned int);
    127126extern void slab_cache_destroy(slab_cache_t *);
    128127
    129 extern void * slab_alloc(slab_cache_t *, int);
     128extern void * slab_alloc(slab_cache_t *, unsigned int);
    130129extern void slab_free(slab_cache_t *, void *);
    131 extern size_t slab_reclaim(int);
     130extern size_t slab_reclaim(unsigned int);
    132131
    133132/* slab subsytem initialization */
     
    139138
    140139/* malloc support */
    141 extern void *malloc(unsigned int, int);
    142 extern void *realloc(void *, unsigned int, int);
     140extern void *malloc(size_t, unsigned int);
     141extern void *realloc(void *, size_t, unsigned int);
    143142extern void free(void *);
    144143
Note: See TracChangeset for help on using the changeset viewer.