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


Ignore:
Timestamp:
2009-04-13T21:35:28Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4ee4046
Parents:
37c312a
Message:

fix compilation in non-SMP configurations

File:
1 edited

Legend:

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

    r37c312a rc822026  
    129129/** Register an answerbox as a receiving end for IRQ notifications.
    130130 *
    131  * @param box           Receiving answerbox.
    132  * @param inr           IRQ number.
    133  * @param devno         Device number.
    134  * @param method        Method to be associated with the notification.
    135  * @param ucode         Uspace pointer to top-half pseudocode.
    136  *
    137  * @return              EBADMEM, ENOENT or EEXISTS on failure or 0 on success.
     131 * @param box    Receiving answerbox.
     132 * @param inr    IRQ number.
     133 * @param devno  Device number.
     134 * @param method Method to be associated with the notification.
     135 * @param ucode  Uspace pointer to top-half pseudocode.
     136 *
     137 * @return EBADMEM, ENOENT or EEXISTS on failure or 0 on success.
     138 *
    138139 */
    139140int ipc_irq_register(answerbox_t *box, inr_t inr, devno_t devno,
     
    148149                (unative_t) devno
    149150        };
    150 
     151       
    151152        if (ucode) {
    152153                code = code_from_uspace(ucode);
     
    156157                code = NULL;
    157158        }
    158 
     159       
    159160        /*
    160161         * Allocate and populate the IRQ structure.
     
    171172        irq->notif_cfg.code = code;
    172173        irq->notif_cfg.counter = 0;
    173 
     174       
    174175        /*
    175176         * Enlist the IRQ structure in the uspace IRQ hash table and the
     
    180181        hlp = hash_table_find(&irq_uspace_hash_table, key);
    181182        if (hlp) {
    182                 irq_t *hirq = hash_table_get_instance(hlp, irq_t, link);
     183                irq_t *hirq __attribute__((unused))
     184                    = hash_table_get_instance(hlp, irq_t, link);
     185               
    183186                /* hirq is locked */
    184187                spinlock_unlock(&hirq->lock);
     
    189192                return EEXISTS;
    190193        }
    191         spinlock_lock(&irq->lock);      /* not really necessary, but paranoid */
     194       
     195        spinlock_lock(&irq->lock);  /* Not really necessary, but paranoid */
    192196        spinlock_lock(&box->irq_lock);
    193197        hash_table_insert(&irq_uspace_hash_table, key, &irq->link);
     
    196200        spinlock_unlock(&irq->lock);
    197201        spinlock_unlock(&irq_uspace_hash_table_lock);
    198 
     202       
    199203        interrupts_restore(ipl);
    200204        return EOK;
Note: See TracChangeset for help on using the changeset viewer.