Changeset 476f62c in mainline for uspace/lib/drv/generic/interrupt.c


Ignore:
Timestamp:
2014-01-17T17:26:48Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5828554, cf982ff
Parents:
61b5b73d (diff), 66be0288 (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 libdrv cleanup.

  • move 'client side' device iface to libdrv (from libc)
  • hide remote_* libdrv headers
  • add a bunch of const qualifiers and change static data to const
  • cleanup: index initialized arrays, array size macro, removes duplicit enums, …

TODO:

move hw_res, pio_window and co to libdrv. (too entangled with libc to move right now)
move clock_dev iface to libdrv. (also tied to libc, we need a time provider solution)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/interrupt.c

    r61b5b73d r476f62c  
    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();
Note: See TracChangeset for help on using the changeset viewer.