OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [libl4/] [src/] [irq.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Functions for userspace irq handling.
3
 *
4
 * Copyright (C) 2009 B Labs Ltd.
5
 */
6
#include L4LIB_INC_ARCH(irq.h)
7
#include L4LIB_INC_ARCH(syscalls.h)
8
#include <l4/api/irq.h>
9
 
10
/*
11
 * Reads the irq notification slot. Destructive atomic read ensures that
12
 * an irq may write to the slot in sync.
13
 */
14
int l4_irq_wait(int slot, int irqnum)
15
{
16
        int irqval = l4_atomic_dest_readb(&(l4_get_utcb()->notify[slot]));
17
 
18
        if (!irqval)
19
                return l4_irq_control(IRQ_CONTROL_WAIT, 0, irqnum);
20
        else
21
                return irqval;
22
}
23
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.