L4Re - L4 Runtime Environment
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 
19 __BEGIN_DECLS
20 
28 struct l4irq_t;
29 typedef struct l4irq_t l4irq_t;
30 
41 L4_CV l4irq_t *
42 l4irq_attach(int irqnum);
43 
55 L4_CV l4irq_t *
56 l4irq_attach_ft(int irqnum, unsigned mode);
57 
68 L4_CV l4irq_t *
69 l4irq_attach_thread(int irqnum, l4_cap_idx_t to_thread);
70 
82 L4_CV l4irq_t *
83 l4irq_attach_thread_ft(int irqnum, l4_cap_idx_t to_thread,
84  unsigned mode);
85 
93 L4_CV long
94 l4irq_wait(l4irq_t *irq);
95 
104 L4_CV long
105 l4irq_unmask_and_wait_any(l4irq_t *unmask_irq, l4irq_t **ret_irq);
106 
114 L4_CV long
115 l4irq_wait_any(l4irq_t **irq);
116 
127 L4_CV long
128 l4irq_unmask(l4irq_t *irq);
129 
137 L4_CV long
138 l4irq_detach(l4irq_t *irq);
139 
140 
141 
142 /***********************************************************************/
164 L4_CV l4irq_t *
165 l4irq_request(int irqnum, void (*isr_handler)(void *), void *isr_data,
166  int irq_thread_prio, unsigned mode);
167 
175 L4_CV long
176 l4irq_release(l4irq_t *irq);
177 
178 
179 
180 /***********************************************************************/
181 /***********************************************************************/
182 
198 L4_CV l4irq_t *
200 
212 L4_CV l4irq_t *
213 l4irq_attach_cap_ft(l4_cap_idx_t irqcap, unsigned mode);
214 
225 L4_CV l4irq_t *
227 
239 L4_CV l4irq_t *
241  unsigned mode);
242 
243 /***********************************************************************/
264 L4_CV l4irq_t *
266  void (*isr_handler)(void *), void *isr_data,
267  int irq_thread_prio, unsigned mode);
268 
l4irq_t * l4irq_attach_thread_cap(l4_cap_idx_t irqcap, l4_cap_idx_t to_thread)
Attach/connect 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.
Common L4 ABI Data Types.
l4irq_t * l4irq_attach_thread_ft(int irqnum, l4_cap_idx_t to_thread, unsigned mode)
Attach/connect to IRQ using given type.
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.
unsigned long l4_cap_idx_t
L4 Capability selector Type.
Definition: types.h:342
#define __END_DECLS
End section with C types and functions.
Definition: compiler.h:193
l4irq_t * l4irq_attach_cap_ft(l4_cap_idx_t irqcap, unsigned mode)
Attach/connect to IRQ using given type.
long l4irq_release(l4irq_t *irq)
Release asynchronous ISR handler and free resources.
L4 compiler related defines.
l4irq_t * l4irq_attach(int irqnum)
Attach/connect to IRQ.
l4irq_t * l4irq_attach_ft(int irqnum, unsigned mode)
Attach/connect to IRQ using given type.
long l4irq_wait_any(l4irq_t **irq)
Wait for any attached IRQ.
#define L4_CV
Define calling convention.
Definition: linkage.h:44
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.
long l4irq_unmask(l4irq_t *irq)
Unmask a specific IRQ.
long l4irq_wait(l4irq_t *irq)
Wait for specified IRQ.
l4irq_t * l4irq_attach_cap(l4_cap_idx_t irqcap)
Attach/connect to IRQ.
l4irq_t * l4irq_attach_thread(int irqnum, l4_cap_idx_t to_thread)
Attach/connect to IRQ.
long l4irq_detach(l4irq_t *irq)
Detach from 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.