Changeset 2845930 in mainline for kernel/generic/src/ddi/irq.c


Ignore:
Timestamp:
2009-04-06T22:05:15Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6071a8f
Parents:
3636964
Message:

Address issues with IRQ notifications.

File:
1 edited

Legend:

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

    r3636964 r2845930  
    102102static index_t irq_ht_hash(unative_t *key);
    103103static bool irq_ht_compare(unative_t *key, count_t keys, link_t *item);
     104static void irq_ht_remove(link_t *item);
    104105
    105106static hash_table_operations_t irq_ht_ops = {
    106107        .hash = irq_ht_hash,
    107108        .compare = irq_ht_compare,
    108         .remove_callback = NULL         /* not used */
     109        .remove_callback = irq_ht_remove,
    109110};
    110111
     
    117118static index_t irq_lin_hash(unative_t *key);
    118119static bool irq_lin_compare(unative_t *key, count_t keys, link_t *item);
     120static void irq_lin_remove(link_t *item);
    119121
    120122static hash_table_operations_t irq_lin_ops = {
    121123        .hash = irq_lin_hash,
    122124        .compare = irq_lin_compare,
    123         .remove_callback = NULL         /* not used */
     125        .remove_callback = irq_lin_remove,
    124126};
    125127
     
    348350}
    349351
     352/** Unlock IRQ structure after hash_table_remove().
     353 *
     354 * @param lnk           Link in the removed and locked IRQ structure.
     355 */
     356void irq_ht_remove(link_t *lnk)
     357{
     358        irq_t *irq = hash_table_get_instance(lnk, irq_t, link);
     359        spinlock_unlock(&irq->lock);
     360}
     361
    350362/** Compute hash index for the key.
    351363 *
     
    407419}
    408420
     421/** Unlock IRQ structure after hash_table_remove().
     422 *
     423 * @param lnk           Link in the removed and locked IRQ structure.
     424 */
     425void irq_lin_remove(link_t *lnk)
     426{
     427        irq_t *irq = hash_table_get_instance(lnk, irq_t, link);
     428        spinlock_unlock(&irq->lock);
     429}
     430
    409431/** @}
    410432 */
Note: See TracChangeset for help on using the changeset viewer.