Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 9359aae in mainline


Ignore:
Timestamp:
2013-12-31T03:49:00Z (8 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
0c322fa
Parents:
7f80313
Message:

libc,libdrv: Pass around const pointer to irq code.

We don't modify it at this point.

Location:
uspace/lib
Files:
4 edited

Legend:

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

    r7f80313 r9359aae  
    280280 *
    281281 */
    282 int irq_register(int inr, int devno, int method, irq_code_t *ucode)
     282int irq_register(int inr, int devno, int method, const irq_code_t *ucode)
    283283{
    284284        return __SYSCALL4(SYS_IRQ_REGISTER, inr, devno, method,
  • uspace/lib/c/include/ddi.h

    r7f80313 r9359aae  
    130130}
    131131
    132 extern int irq_register(int, int, int, irq_code_t *);
     132extern int irq_register(int, int, int, const irq_code_t *);
    133133extern int irq_unregister(int, int);
    134134
  • uspace/lib/drv/generic/interrupt.c

    r7f80313 r9359aae  
    3939#include <errno.h>
    4040#include <sys/types.h>
     41#include <macros.h>
    4142
    4243#include "ddf/interrupt.h"
     
    5556static interrupt_context_t *find_interrupt_context(
    5657    interrupt_context_list_t *list, ddf_dev_t *dev, int irq);
    57 int register_interrupt_handler(ddf_dev_t *dev, int irq,
    58     interrupt_handler_t *handler, irq_code_t *pseudocode);
    59 int unregister_interrupt_handler(ddf_dev_t *dev, int irq);
    6058
    6159/** Interrupts */
     
    6866};
    6967
    70 static irq_code_t default_pseudocode = {
     68static const irq_code_t default_pseudocode = {
    7169        0,
    7270        NULL,
    73         sizeof(default_cmds) / sizeof(irq_cmd_t),
     71        ARRAY_SIZE(default_cmds),
    7472        default_cmds
    7573};
     
    169167
    170168int register_interrupt_handler(ddf_dev_t *dev, int irq,
    171     interrupt_handler_t *handler, irq_code_t *pseudocode)
     169    interrupt_handler_t *handler, const irq_code_t *pseudocode)
    172170{
    173171        interrupt_context_t *ctx = create_interrupt_context();
  • uspace/lib/drv/include/ddf/interrupt.h

    r7f80313 r9359aae  
    6767extern void interrupt_init(void);
    6868extern int register_interrupt_handler(ddf_dev_t *, int, interrupt_handler_t *,
    69     irq_code_t *);
     69    const irq_code_t *);
    7070extern int unregister_interrupt_handler(ddf_dev_t *, int);
    7171
Note: See TracChangeset for help on using the changeset viewer.