Rev 771 | Rev 781 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 771 | Rev 776 | ||
|---|---|---|---|
| Line 64... | Line 64... | ||
| 64 | }slab_magazine_t; |
64 | }slab_magazine_t; |
| 65 | 65 | ||
| 66 | typedef struct { |
66 | typedef struct { |
| 67 | char *name; |
67 | char *name; |
| 68 | 68 | ||
| 69 | SPINLOCK_DECLARE(lock); |
- | |
| 70 | link_t link; |
69 | link_t link; |
| 71 | /* Configuration */ |
70 | /* Configuration */ |
| 72 | size_t size; /**< Size of SLAB position - align_up(sizeof(obj)) */ |
71 | size_t size; /**< Size of SLAB position - align_up(sizeof(obj)) */ |
| 73 | int (*constructor)(void *obj, int kmflag); |
72 | int (*constructor)(void *obj, int kmflag); |
| 74 | void (*destructor)(void *obj); |
73 | void (*destructor)(void *obj); |
| Line 84... | Line 83... | ||
| 84 | atomic_t cached_objs; |
83 | atomic_t cached_objs; |
| 85 | 84 | ||
| 86 | /* Slabs */ |
85 | /* Slabs */ |
| 87 | link_t full_slabs; /**< List of full slabs */ |
86 | link_t full_slabs; /**< List of full slabs */ |
| 88 | link_t partial_slabs; /**< List of partial slabs */ |
87 | link_t partial_slabs; /**< List of partial slabs */ |
| - | 88 | SPINLOCK_DECLARE(slablock); |
|
| 89 | /* Magazines */ |
89 | /* Magazines */ |
| 90 | link_t magazines; /**< List o full magazines */ |
90 | link_t magazines; /**< List o full magazines */ |
| - | 91 | SPINLOCK_DECLARE(maglock); |
|
| 91 | 92 | ||
| 92 | /** CPU cache */ |
93 | /** CPU cache */ |
| 93 | struct { |
94 | struct { |
| 94 | slab_magazine_t *current; |
95 | slab_magazine_t *current; |
| 95 | slab_magazine_t *last; |
96 | slab_magazine_t *last; |