L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
irq.h
Go to the documentation of this file.
1
5/*
6 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
7 * Henning Schild <hschild@os.inf.tu-dresden.de>
8 * economic rights: Technische Universität Dresden (Germany)
9 *
10 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU General Public License 2.
12 * Please see the COPYING-GPL-2 file for details.
13 */
14#pragma once
15
16#include <l4/sys/compiler.h>
17#include <l4/sys/types.h>
18
20
28struct l4irq_t;
29typedef struct l4irq_t l4irq_t;
30
41L4_CV l4irq_t *
42l4irq_attach(int irqnum);
43
55L4_CV l4irq_t *
56l4irq_attach_ft(int irqnum, unsigned mode);
57
68L4_CV l4irq_t *
69l4irq_attach_thread(int irqnum, l4_cap_idx_t to_thread);
70
82L4_CV l4irq_t *
84 unsigned mode);
85
93L4_CV long
94l4irq_wait(l4irq_t *irq);
95
105L4_CV long
106l4irq_unmask_and_wait_any(l4irq_t *unmask_irq, l4irq_t **ret_irq);
107
115L4_CV long
116l4irq_wait_any(l4irq_t **irq);
117
128L4_CV long
129l4irq_unmask(l4irq_t *irq);
130
138L4_CV long
139l4irq_detach(l4irq_t *irq);
140
141
142
143/***********************************************************************/
165L4_CV l4irq_t *
166l4irq_request(int irqnum, void (*isr_handler)(void *), void *isr_data,
167 int irq_thread_prio, unsigned mode);
168
176L4_CV long
177l4irq_release(l4irq_t *irq);
178
179
180
181/***********************************************************************/
182/***********************************************************************/
183
199L4_CV l4irq_t *
201
213L4_CV l4irq_t *
214l4irq_attach_cap_ft(l4_cap_idx_t irqcap, unsigned mode);
215
226L4_CV l4irq_t *
228
240L4_CV l4irq_t *
242 unsigned mode);
243
244/***********************************************************************/
265L4_CV l4irq_t *
267 void (*isr_handler)(void *), void *isr_data,
268 int irq_thread_prio, unsigned mode);
269
L4 compiler related defines.
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:359
l4irq_t * l4irq_request_cap(l4_cap_idx_t irqcap, void(*isr_handler)(void *), void *isr_data, int irq_thread_prio, unsigned mode)
Attach asychronous ISR handler to IRQ.
l4irq_t * l4irq_request(int irqnum, void(*isr_handler)(void *), void *isr_data, int irq_thread_prio, unsigned mode)
Attach asychronous ISR handler to IRQ.
long l4irq_release(l4irq_t *irq)
Release asynchronous ISR handler and free resources.
l4irq_t * l4irq_attach_cap(l4_cap_idx_t irqcap)
Attach/connect to IRQ.
l4irq_t * l4irq_attach_thread_cap(l4_cap_idx_t irqcap, l4_cap_idx_t to_thread)
Attach/connect to IRQ.
l4irq_t * l4irq_attach_thread_cap_ft(l4_cap_idx_t irqcap, l4_cap_idx_t to_thread, unsigned mode)
Attach/connect to IRQ using given type.
l4irq_t * l4irq_attach_cap_ft(l4_cap_idx_t irqcap, unsigned mode)
Attach/connect to IRQ using given type.
l4irq_t * l4irq_attach_thread_ft(int irqnum, l4_cap_idx_t to_thread, unsigned mode)
Attach/connect to IRQ using given type.
long l4irq_wait_any(l4irq_t **irq)
Wait for any attached IRQ.
l4irq_t * l4irq_attach_thread(int irqnum, l4_cap_idx_t to_thread)
Attach/connect to IRQ.
long l4irq_unmask_and_wait_any(l4irq_t *unmask_irq, l4irq_t **ret_irq)
Unmask a specific IRQ and wait for any attached IRQ.
l4irq_t * l4irq_attach(int irqnum)
Attach/connect to IRQ.
long l4irq_detach(l4irq_t *irq)
Detach from IRQ.
long l4irq_wait(l4irq_t *irq)
Wait for specified IRQ.
l4irq_t * l4irq_attach_ft(int irqnum, unsigned mode)
Attach/connect to IRQ using given type.
long l4irq_unmask(l4irq_t *irq)
Unmask a specific IRQ.
#define __END_DECLS
End section with C types and functions.
Definition compiler.h:199
#define L4_CV
Define calling convention.
Definition linkage.h:44
#define __BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:196
Common L4 ABI Data Types.