Changeset e9d15d9 in mainline for uspace/lib/c


Ignore:
Timestamp:
2017-08-18T21:15:26Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24abb85d
Parents:
1c85bae
Message:

Turn IRQ structures into kernel objects

ipc_irq_subscribe() now returns a capability for the underlying IRQ kernel
object. ipc_irq_unsubscribe() can now be done only with a valid IRQ capability.

Location:
uspace/lib/c
Files:
4 edited

Legend:

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

    r1c85bae re9d15d9  
    10271027 * @param ucode   Top-half pseudocode handler.
    10281028 *
    1029  * @return Zero on success or a negative error code.
     1029 * @return IRQ capability on success.
     1030 * @return Negative error code.
    10301031 *
    10311032 */
     
    10561057/** Unsubscribe from IRQ notification.
    10571058 *
    1058  * @param inr     IRQ number.
    1059  * @param devno   Device number of the device generating inr.
     1059 * @param cap     IRQ capability.
    10601060 *
    10611061 * @return Zero on success or a negative error code.
    10621062 *
    10631063 */
    1064 int async_irq_unsubscribe(int inr, int devno)
     1064int async_irq_unsubscribe(int cap)
    10651065{
    10661066        // TODO: Remove entry from hash table
    10671067        //       to avoid memory leak
    10681068       
    1069         return ipc_irq_unsubscribe(inr, devno);
     1069        return ipc_irq_unsubscribe(cap);
    10701070}
    10711071
  • uspace/lib/c/generic/irq.c

    r1c85bae re9d15d9  
    5959 * @param ucode  Top-half pseudocode handler.
    6060 *
    61  * @return Value returned by the kernel.
     61 * @return IRQ capability returned by the kernel.
     62 * @return Error code returned by the kernel.
    6263 *
    6364 */
     
    7475/** Unsubscribe from IRQ notification.
    7576 *
    76  * @param inr   IRQ number.
    77  * @param devno Device number of the device generating inr.
     77 * @param cap   IRQ capability.
    7878 *
    7979 * @return Value returned by the kernel.
    8080 *
    8181 */
    82 int ipc_irq_unsubscribe(int inr, int devno)
     82int ipc_irq_unsubscribe(int cap)
    8383{
    84         return __SYSCALL2(SYS_IPC_IRQ_UNSUBSCRIBE, inr, devno);
     84        return __SYSCALL1(SYS_IPC_IRQ_UNSUBSCRIBE, cap);
    8585}
    8686
  • uspace/lib/c/include/async.h

    r1c85bae re9d15d9  
    168168extern int async_irq_subscribe(int, int, async_notification_handler_t, void *,
    169169    const irq_code_t *);
    170 extern int async_irq_unsubscribe(int, int);
     170extern int async_irq_unsubscribe(int);
    171171
    172172extern int async_event_subscribe(event_type_t, async_notification_handler_t,
  • uspace/lib/c/include/ipc/irq.h

    r1c85bae re9d15d9  
    4040
    4141extern int ipc_irq_subscribe(int, int, sysarg_t, const irq_code_t *);
    42 extern int ipc_irq_unsubscribe(int, int);
     42extern int ipc_irq_unsubscribe(int);
    4343
    4444#endif
Note: See TracChangeset for help on using the changeset viewer.