Changeset 551 for trunk/kernel/mm/khm.c
- Timestamp:
- Sep 21, 2018, 10:24:34 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/khm.c
r492 r551 78 78 79 79 // get lock protecting heap 80 spinlock_lock( &khm->lock ); 80 uint32_t irq_state; 81 spinlock_lock_busy( &khm->lock, &irq_state ); 81 82 82 83 // define a starting block to scan existing blocks … … 92 93 if( (intptr_t)current >= (khm->base + khm->size) ) // heap full 93 94 { 94 spinlock_unlock (&khm->lock);95 spinlock_unlock_busy(&khm->lock, irq_state ); 95 96 96 97 printk("\n[ERROR] in %s : failed to allocate block of size %d\n", … … 122 123 123 124 // release lock protecting heap 124 spinlock_unlock ( &khm->lock);125 spinlock_unlock_busy( &khm->lock, irq_state ); 125 126 126 127 return (char*)current + sizeof(khm_block_t);
Note: See TracChangeset
for help on using the changeset viewer.