Changeset 80bcaed in mainline for kernel/generic/include/mm/slab.h


Ignore:
Timestamp:
2007-02-03T13:22:24Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f619ec11
Parents:
fa8e7d2
Message:

Merge as_t structure into one and leave the differring parts in as_genarch_t.

Indentation and formatting changes in header files.

File:
1 edited

Legend:

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

    rfa8e7d2 r80bcaed  
    5757
    5858/* slab_reclaim constants */
    59 #define SLAB_RECLAIM_ALL  0x1 /**< Reclaim all possible memory, because we are in memory stress */
     59
     60/** Reclaim all possible memory, because we are in memory stress */
     61#define SLAB_RECLAIM_ALL  0x1
    6062
    6163/* cache_create flags */
    62 #define SLAB_CACHE_NOMAGAZINE 0x1 /**< Do not use per-cpu cache */
    63 #define SLAB_CACHE_SLINSIDE   0x2 /**< Have control structure inside SLAB */
    64 #define SLAB_CACHE_MAGDEFERRED (0x4 | SLAB_CACHE_NOMAGAZINE) /**< We add magazine cache later, if we have this flag */
     64
     65/** Do not use per-cpu cache */
     66#define SLAB_CACHE_NOMAGAZINE 0x1
     67/** Have control structure inside SLAB */
     68#define SLAB_CACHE_SLINSIDE   0x2
     69/** We add magazine cache later, if we have this flag */
     70#define SLAB_CACHE_MAGDEFERRED (0x4 | SLAB_CACHE_NOMAGAZINE)
    6571
    6672typedef struct {
     
    8288
    8389        link_t link;
     90
    8491        /* Configuration */
    85         size_t size;            /**< Size of slab position - align_up(sizeof(obj)) */
     92        /** Size of slab position - align_up(sizeof(obj)) */
     93        size_t size;
     94
    8695        int (*constructor)(void *obj, int kmflag);
    8796        int (*destructor)(void *obj);
    88         int flags;              /**< Flags changing behaviour of cache */
     97
     98        /** Flags changing behaviour of cache */
     99        int flags;
    89100
    90101        /* Computed values */
     
    96107        atomic_t allocated_objs;
    97108        atomic_t cached_objs;
    98         atomic_t magazine_counter; /**< How many magazines in magazines list */
     109        /** How many magazines in magazines list */
     110        atomic_t magazine_counter;
    99111
    100112        /* Slabs */
     
    110122} slab_cache_t;
    111123
    112 extern slab_cache_t * slab_cache_create(char *name,
    113                                         size_t size,
    114                                         size_t align,
    115                                         int (*constructor)(void *obj, int kmflag),
    116                                         int (*destructor)(void *obj),
    117                                         int flags);
     124extern slab_cache_t * slab_cache_create(char *name, size_t size, size_t align,
     125    int (*constructor)(void *obj, int kmflag), int (*destructor)(void *obj),
     126    int flags);
    118127extern void slab_cache_destroy(slab_cache_t *cache);
    119128
     
    122131extern count_t slab_reclaim(int flags);
    123132
    124 /** Initialize slab subsytem */
     133/* slab subsytem initialization */
    125134extern void slab_cache_init(void);
    126135extern void slab_enable_cpucache(void);
Note: See TracChangeset for help on using the changeset viewer.