Changeset 15d0046 in mainline for uspace/lib/c/generic/irq.c
- Timestamp:
- 2014-09-12T13:22:33Z (10 years ago)
- 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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/irq.c
r8db09e4 r15d0046 1 1 /* 2 * Copyright (c) 20 05 Jakub Jermar2 * Copyright (c) 2014 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup mips64mm29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 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> 43 37 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 */ 48 int ipc_irq_subscribe(int inr, int devno, sysarg_t method, 49 const irq_code_t *ucode) 46 50 { 47 as_operations = &as_ht_operations;48 asid_fifo_init();51 return __SYSCALL4(SYS_IPC_IRQ_SUBSCRIBE, inr, devno, method, 52 (sysarg_t) ucode); 49 53 } 50 54 51 /** Install address space.55 /** Unsubscribe from IRQ notification. 52 56 * 53 * Install ASID. 57 * @param inr IRQ number. 58 * @param devno Device number of the device generating inr. 54 59 * 55 * @ param as Address space structure.60 * @return Value returned by the kernel. 56 61 * 57 62 */ 58 void as_install_arch(as_t *as)63 int ipc_irq_unsubscribe(int inr, int devno) 59 64 { 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); 67 66 } 68 67
Note:
See TracChangeset
for help on using the changeset viewer.