Changeset a2bd8822 in mainline for kernel/generic/src/ipc/irq.c


Ignore:
Timestamp:
2012-02-25T16:50:37Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6561a8e
Parents:
a76b01b4 (diff), b40ea02 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/irq.c

    ra76b01b4 ra2bd8822  
    358358        ASSERT(irq->notif_cfg.answerbox == box);
    359359       
    360         /* Free up the pseudo code and associated structures. */
    361         code_free(irq->notif_cfg.code);
    362        
    363360        /* Remove the IRQ from the answerbox's list. */
    364361        list_remove(&irq->notif_cfg.link);
     
    378375        irq_spinlock_unlock(&box->irq_lock, false);
    379376        irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);
     377       
     378        /* Free up the pseudo code and associated structures. */
     379        code_free(irq->notif_cfg.code);
    380380       
    381381        /* Free up the IRQ structure. */
     
    425425                list_remove(&irq->notif_cfg.link);
    426426               
    427                 /* Free up the pseudo code and associated structures. */
    428                 code_free(irq->notif_cfg.code);
    429                
    430427                /*
    431428                 * We need to drop the IRQ lock now because hash_table_remove()
     
    439436                /* Remove from the hash table. */
    440437                hash_table_remove(&irq_uspace_hash_table, key, 2);
    441                
     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);
    442446                free(irq);
     447               
     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);
    443451        }
    444452       
Note: See TracChangeset for help on using the changeset viewer.