Ignore:
File:
1 edited

Legend:

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

    r9cdac5a r228e490  
    131131/** Register an answerbox as a receiving end for IRQ notifications.
    132132 *
    133  * @param box           Receiving answerbox.
    134  * @param inr           IRQ number.
    135  * @param devno         Device number.
    136  * @param imethod       Interface and method to be associated with the
    137  *                      notification.
    138  * @param ucode         Uspace pointer to top-half pseudocode.
    139  * @return              EOK on success or a negative error code.
     133 * @param box     Receiving answerbox.
     134 * @param inr     IRQ number.
     135 * @param devno   Device number.
     136 * @param imethod Interface and method to be associated
     137 *                with the notification.
     138 * @param ucode   Uspace pointer to top-half pseudocode.
     139 *
     140 * @return EBADMEM, ENOENT or EEXISTS on failure or 0 on success.
    140141 *
    141142 */
     
    147148                (sysarg_t) devno
    148149        };
    149 
    150         if ((inr < 0) || (inr > last_inr))
    151                 return ELIMIT;
    152150       
    153151        irq_code_t *code;
     
    210208/** Unregister task from IRQ notification.
    211209 *
    212  * @param box           Answerbox associated with the notification.
    213  * @param inr           IRQ number.
    214  * @param devno         Device number.
    215  * @return              EOK on success or a negative error code.
     210 * @param box   Answerbox associated with the notification.
     211 * @param inr   IRQ number.
     212 * @param devno Device number.
     213 *
    216214 */
    217215int ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno)
     
    221219                (sysarg_t) devno
    222220        };
    223 
    224         if ((inr < 0) || (inr > last_inr))
    225                 return ELIMIT;
    226221       
    227222        irq_spinlock_lock(&irq_uspace_hash_table_lock, true);
     
    404399                            (uint32_t) code->cmds[i].value);
    405400                        break;
    406                 case CMD_PIO_WRITE_A_8:
    407                         if (srcarg) {
    408                                 pio_write_8((ioport8_t *) code->cmds[i].addr,
    409                                     (uint8_t) scratch[srcarg]);
    410                         }
    411                         break;
    412                 case CMD_PIO_WRITE_A_16:
    413                         if (srcarg) {
    414                                 pio_write_16((ioport16_t *) code->cmds[i].addr,
    415                                     (uint16_t) scratch[srcarg]);
    416                         }
    417                         break;
    418                 case CMD_PIO_WRITE_A_32:
    419                         if (srcarg) {
    420                                 pio_write_32((ioport32_t *) code->cmds[i].addr,
    421                                     (uint32_t) scratch[srcarg]);
    422                         }
    423                         break;
    424401                case CMD_BTEST:
    425402                        if ((srcarg) && (dstarg)) {
Note: See TracChangeset for help on using the changeset viewer.