Changeset 15d0046 in mainline for uspace/lib/c/generic/irq.c


Ignore:
Timestamp:
2014-09-12T13:22:33Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b20126
Parents:
8db09e4 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 moved

Legend:

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

    r8db09e4 r15d0046  
    11/*
    2  * Copyright (c) 2005 Jakub Jermar
     2 * Copyright (c) 2014 Martin Decky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup mips64mm
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include <arch/mm/as.h>
    36 #include <genarch/mm/as_ht.h>
    37 #include <genarch/mm/page_ht.h>
    38 #include <genarch/mm/asid_fifo.h>
    39 #include <arch/mm/tlb.h>
    40 #include <mm/tlb.h>
    41 #include <mm/as.h>
    42 #include <arch/cp0.h>
     35#include <ipc/irq.h>
     36#include <libc.h>
    4337
    44 /** Architecture dependent address space init. */
    45 void as_arch_init(void)
     38/** Subscribe to IRQ notification.
     39 *
     40 * @param inr    IRQ number.
     41 * @param devno  Device number of the device generating inr.
     42 * @param method Use this method for notifying me.
     43 * @param ucode  Top-half pseudocode handler.
     44 *
     45 * @return Value returned by the kernel.
     46 *
     47 */
     48int ipc_irq_subscribe(int inr, int devno, sysarg_t method,
     49    const irq_code_t *ucode)
    4650{
    47         as_operations = &as_ht_operations;
    48         asid_fifo_init();
     51        return __SYSCALL4(SYS_IPC_IRQ_SUBSCRIBE, inr, devno, method,
     52            (sysarg_t) ucode);
    4953}
    5054
    51 /** Install address space.
     55/** Unsubscribe from IRQ notification.
    5256 *
    53  * Install ASID.
     57 * @param inr   IRQ number.
     58 * @param devno Device number of the device generating inr.
    5459 *
    55  * @param as Address space structure.
     60 * @return Value returned by the kernel.
    5661 *
    5762 */
    58 void as_install_arch(as_t *as)
     63int ipc_irq_unsubscribe(int inr, int devno)
    5964{
    60         /*
    61          * Install ASID.
    62          */
    63         entry_hi_t hi;
    64         hi.value = cp0_entry_hi_read();
    65         hi.asid = as->asid;
    66         cp0_entry_hi_write(hi.value);
     65        return __SYSCALL2(SYS_IPC_IRQ_UNSUBSCRIBE, inr, devno);
    6766}
    6867
Note: See TracChangeset for help on using the changeset viewer.