Changeset 81e52f2a in mainline for generic/src/mm/slab.c
- Timestamp:
- 2006-02-04T00:53:19Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c5613b7
- Parents:
- c352c2e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/mm/slab.c
rc352c2e r81e52f2a 366 366 void *obj; 367 367 368 if (!CPU) 369 return NULL; 370 368 371 spinlock_lock(&cache->mag_cache[CPU->id].lock); 369 372 … … 436 439 slab_magazine_t *mag; 437 440 441 if (!CPU) 442 return -1; 443 438 444 spinlock_lock(&cache->mag_cache[CPU->id].lock); 439 445 … … 508 514 spinlock_initialize(&cache->lock, "cachelock"); 509 515 if (! (cache->flags & SLAB_CACHE_NOMAGAZINE)) { 510 for (i=0; i< config.cpu_count; i++) 516 for (i=0; i< config.cpu_count; i++) { 517 memsetb((__address)&cache->mag_cache[i], 518 sizeof(cache->mag_cache[i]), 0); 511 519 spinlock_initialize(&cache->mag_cache[i].lock, 512 520 "cpucachelock"); 521 } 513 522 } 514 523 … … 645 654 ipl = interrupts_disable(); 646 655 647 if (!(cache->flags & SLAB_CACHE_NOMAGAZINE) && CPU)656 if (!(cache->flags & SLAB_CACHE_NOMAGAZINE)) 648 657 result = magazine_obj_get(cache); 649 658 … … 670 679 671 680 if ((cache->flags & SLAB_CACHE_NOMAGAZINE) \ 672 || !CPU \673 681 || magazine_obj_put(cache, obj)) { 674 675 682 spinlock_lock(&cache->lock); 676 683 slab_obj_destroy(cache, obj, slab);
Note:
See TracChangeset
for help on using the changeset viewer.