Changeset 07cb0108 in mainline for uspace/lib/c/generic/irc.c


Ignore:
Timestamp:
2017-10-08T20:55:13Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b08941d
Parents:
53a309e
Message:

Sort out irc_disable_interrupt vs irc_clear_interrupt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/irc.c

    r53a309e r07cb0108  
    6161/** Enable interrupt.
    6262 *
     63 * Allow interrupt delivery.
     64 *
    6365 * @param irq   IRQ number
    6466 */
     
    8082}
    8183
    82 
    8384/** Disable interrupt.
     85 *
     86 * Disallow interrupt delivery.
    8487 *
    8588 * @param irq   IRQ number
    8689 */
    8790int irc_disable_interrupt(int irq)
     91{
     92        int rc;
     93
     94        if (irc_sess == NULL) {
     95                rc = irc_init();
     96                if (rc != EOK)
     97                        return rc;
     98        }
     99
     100        async_exch_t *exch = async_exchange_begin(irc_sess);
     101        rc = async_req_1_0(exch, IRC_DISABLE_INTERRUPT, irq);
     102        async_exchange_end(exch);
     103
     104        return rc;
     105}
     106
     107/** Clear interrupt.
     108 *
     109 * Clear/acknowledge interrupt in interrupt controller so that
     110 * another interrupt can be delivered.
     111 *
     112 * @param irq   IRQ number
     113 */
     114int irc_clear_interrupt(int irq)
    88115{
    89116        int rc;
Note: See TracChangeset for help on using the changeset viewer.