Fix dynamic slab insertion.
This commit is contained in:
parent
3cdfa86d65
commit
b3fe43da1d
1 changed files with 1 additions and 1 deletions
|
@ -358,8 +358,8 @@ slab_cache_add(size_t size)
|
||||||
pthread_mutex_init(&(slab->slab_lock), NULL);
|
pthread_mutex_init(&(slab->slab_lock), NULL);
|
||||||
|
|
||||||
pthread_mutex_lock(&(slabheads[sindx].slab_lock));
|
pthread_mutex_lock(&(slabheads[sindx].slab_lock));
|
||||||
slabheads[sindx].next = slab;
|
|
||||||
slab->next = slabheads[sindx].next;
|
slab->next = slabheads[sindx].next;
|
||||||
|
slabheads[sindx].next = slab;
|
||||||
pthread_mutex_unlock(&(slabheads[sindx].slab_lock));
|
pthread_mutex_unlock(&(slabheads[sindx].slab_lock));
|
||||||
}
|
}
|
||||||
return (1);
|
return (1);
|
||||||
|
|
Loading…
Reference in a new issue