~m-lombardi85/exfat-helenos/exfat

« back to all changes in this revision

Viewing changes to kernel/generic/src/ipc/irq.c

  • Committer: Maurizio Lombardi
  • Date: 2012-02-27 12:58:00 UTC
  • mfrom: (1309.1.96 helenos-mainline)
  • Revision ID: m.lombardi85@gmail.com-20120227125800-n16me6glkloj4vl1
MergeĀ mainlineĀ changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
357
357
        
358
358
        ASSERT(irq->notif_cfg.answerbox == box);
359
359
        
360
 
        /* Free up the pseudo code and associated structures. */
361
 
        code_free(irq->notif_cfg.code);
362
 
        
363
360
        /* Remove the IRQ from the answerbox's list. */
364
361
        list_remove(&irq->notif_cfg.link);
365
362
        
378
375
        irq_spinlock_unlock(&box->irq_lock, false);
379
376
        irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);
380
377
        
 
378
        /* Free up the pseudo code and associated structures. */
 
379
        code_free(irq->notif_cfg.code);
 
380
        
381
381
        /* Free up the IRQ structure. */
382
382
        free(irq);
383
383
        
424
424
                /* Unlist from the answerbox. */
425
425
                list_remove(&irq->notif_cfg.link);
426
426
                
427
 
                /* Free up the pseudo code and associated structures. */
428
 
                code_free(irq->notif_cfg.code);
429
 
                
430
427
                /*
431
428
                 * We need to drop the IRQ lock now because hash_table_remove()
432
429
                 * will try to reacquire it. That basically violates the natural
438
435
                
439
436
                /* Remove from the hash table. */
440
437
                hash_table_remove(&irq_uspace_hash_table, key, 2);
 
438
 
 
439
                /*
 
440
                 * Release both locks so that we can free the pseudo code.
 
441
                 */
 
442
                irq_spinlock_unlock(&box->irq_lock, false);
 
443
                irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);
 
444
 
 
445
                code_free(irq->notif_cfg.code);
 
446
                free(irq);
441
447
                
442
 
                free(irq);
 
448
                /* Reacquire both locks before taking another round. */
 
449
                irq_spinlock_lock(&irq_uspace_hash_table_lock, true);
 
450
                irq_spinlock_lock(&box->irq_lock, false);
443
451
        }
444
452
        
445
453
        irq_spinlock_unlock(&box->irq_lock, false);