]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4util/include/ARCH-arm/irq.h
update: sync
[l4.git] / l4 / pkg / l4util / include / ARCH-arm / irq.h
1 /**
2  * \file
3  * \brief ARM specific implementation of irq functions
4  *
5  * Do not use.
6  */
7 /*
8  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
9  *               Alexander Warg <warg@os.inf.tu-dresden.de>,
10  *               Frank Mehnert <fm3@os.inf.tu-dresden.de>
11  *     economic rights: Technische Universität Dresden (Germany)
12  * This file is part of TUD:OS and distributed under the terms of the
13  * GNU Lesser General Public License 2.1.
14  * Please see the COPYING-LGPL-2.1 file for details.
15  */
16 #ifndef __L4UTIL__ARCH_ARCH__IRQ_H__
17 #define __L4UTIL__ARCH_ARCH__IRQ_H__
18
19 #ifdef __GNUC__
20
21 #include <l4/sys/kdebug.h>
22 #include <l4/sys/compiler.h>
23
24 EXTERN_C_BEGIN
25
26 L4_INLINE void l4util_cli (void);
27 L4_INLINE void l4util_sti (void);
28 L4_INLINE void l4util_flags_save(l4_umword_t *flags);
29 L4_INLINE void l4util_flags_restore(l4_umword_t *flags);
30
31 /** \brief Disable all interrupts
32  * \internal
33  */
34 L4_INLINE
35 void
36 l4util_cli (void)
37 {
38   l4_sys_cli();
39 }
40
41 /** \brief Enable all interrupts
42  * \internal
43  */
44 L4_INLINE
45 void
46 l4util_sti (void)
47 {
48   l4_sys_sti();
49 }
50
51 /**
52  * \brief Do not use
53  * \internal
54  *
55  * !!!!!!!
56  *  We probably need some primitive like in linux here which
57  *    enable/disable interrupts on l4util_flags_restore
58  *
59  */
60
61 L4_INLINE
62 void
63 l4util_flags_save(l4_umword_t *flags)
64 {
65   (void)flags;
66   enter_kdebug("l4util_flags_save");
67 }
68
69 /** \brief Restore processor flags. Can be used to restore the interrupt flag
70  * \internal
71  */
72 L4_INLINE
73 void
74 l4util_flags_restore(l4_umword_t *flags)
75 {
76   (void)flags;
77   enter_kdebug("l4util_flags_restore");
78 }
79
80 EXTERN_C_END
81
82 #endif //__GNUC__
83
84 #endif /* ! __L4UTIL__ARCH_ARCH__IRQ_H__ */