Changeset 2d3ddad in mainline
- Timestamp:
- 2010-06-08T21:08:44Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8f80c77
- Parents:
- c992538a
- Location:
- kernel/generic/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/slab.c
rc992538a r2d3ddad 405 405 /** Find full magazine, set it as current and return it 406 406 * 407 * Assume cpu_magazine lock is held408 *409 407 */ 410 408 static slab_magazine_t *get_full_current_mag(slab_cache_t *cache) … … 412 410 slab_magazine_t *cmag = cache->mag_cache[CPU->id].current; 413 411 slab_magazine_t *lastmag = cache->mag_cache[CPU->id].last; 412 413 ASSERT(spinlock_locked(&cache->mag_cache[CPU->id].lock)); 414 414 415 415 if (cmag) { /* First try local CPU magazines */ … … 467 467 * or NULL if no empty magazine is available and cannot be allocated 468 468 * 469 * Assume mag_cache[CPU->id].lock is held470 *471 469 * We have 2 magazines bound to processor. 472 470 * First try the current. … … 480 478 slab_magazine_t *lastmag = cache->mag_cache[CPU->id].last; 481 479 480 ASSERT(spinlock_locked(&cache->mag_cache[CPU->id].lock)); 481 482 482 if (cmag) { 483 483 if (cmag->busy < cmag->size) -
kernel/generic/src/proc/scheduler.c
rc992538a r2d3ddad 379 379 * switch to a new thread. 380 380 * 381 * Assume THREAD->lock is held.382 *383 381 */ 384 382 void scheduler_separated_stack(void) … … 388 386 as_t *old_as = AS; 389 387 388 ASSERT(!THREAD || irq_spinlock_locked(&THREAD->lock)); 390 389 ASSERT(CPU != NULL); 391 390 -
kernel/generic/src/proc/thread.c
rc992538a r2d3ddad 371 371 * 372 372 * Detach thread from all queues, cpus etc. and destroy it. 373 * Assume thread->lock is held!374 373 * 375 374 * @param thread Thread to be destroyed. … … 380 379 void thread_destroy(thread_t *thread, bool irq_res) 381 380 { 381 ASSERT(irq_spinlock_locked(&thread->lock)); 382 382 ASSERT((thread->state == Exiting) || (thread->state == Lingering)); 383 383 ASSERT(thread->task);
Note:
See TracChangeset
for help on using the changeset viewer.