Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4253 → Rev 4254

/trunk/kernel/generic/src/ddi/irq.c
101,11 → 101,12
*/
static index_t irq_ht_hash(unative_t *key);
static bool irq_ht_compare(unative_t *key, count_t keys, link_t *item);
static void irq_ht_remove(link_t *item);
 
static hash_table_operations_t irq_ht_ops = {
.hash = irq_ht_hash,
.compare = irq_ht_compare,
.remove_callback = NULL /* not used */
.remove_callback = irq_ht_remove,
};
 
/**
116,11 → 117,12
*/
static index_t irq_lin_hash(unative_t *key);
static bool irq_lin_compare(unative_t *key, count_t keys, link_t *item);
static void irq_lin_remove(link_t *item);
 
static hash_table_operations_t irq_lin_ops = {
.hash = irq_lin_hash,
.compare = irq_lin_compare,
.remove_callback = NULL /* not used */
.remove_callback = irq_lin_remove,
};
 
/** Number of buckets in either of the hash tables. */
347,6 → 349,16
return rv;
}
 
/** Unlock IRQ structure after hash_table_remove().
*
* @param lnk Link in the removed and locked IRQ structure.
*/
void irq_ht_remove(link_t *lnk)
{
irq_t *irq = hash_table_get_instance(lnk, irq_t, link);
spinlock_unlock(&irq->lock);
}
 
/** Compute hash index for the key.
*
* This function computes hash index into
406,5 → 418,15
return rv;
}
 
/** Unlock IRQ structure after hash_table_remove().
*
* @param lnk Link in the removed and locked IRQ structure.
*/
void irq_lin_remove(link_t *lnk)
{
irq_t *irq = hash_table_get_instance(lnk, irq_t, link);
spinlock_unlock(&irq->lock);
}
 
/** @}
*/