1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup RTEMSImplClassicIO |
---|
5 | * |
---|
6 | * @brief This header file provides interfaces used by the I/O Manager |
---|
7 | * implementation. |
---|
8 | */ |
---|
9 | |
---|
10 | /* |
---|
11 | * COPYRIGHT (c) 1989-2008. |
---|
12 | * On-Line Applications Research Corporation (OAR). |
---|
13 | * |
---|
14 | * The license and distribution terms for this file may be |
---|
15 | * found in the file LICENSE in this distribution or at |
---|
16 | * http://www.rtems.org/license/LICENSE. |
---|
17 | */ |
---|
18 | |
---|
19 | #ifndef _RTEMS_IOIMPL_H |
---|
20 | #define _RTEMS_IOIMPL_H |
---|
21 | |
---|
22 | #include <rtems/io.h> |
---|
23 | #include <rtems/score/isrlock.h> |
---|
24 | |
---|
25 | #ifdef __cplusplus |
---|
26 | extern "C" { |
---|
27 | #endif /* __cplusplus */ |
---|
28 | |
---|
29 | /** |
---|
30 | * @defgroup RTEMSImplClassicIO I/O Manager |
---|
31 | * |
---|
32 | * @ingroup RTEMSImplClassic |
---|
33 | * |
---|
34 | * @brief This group contains the I/O Manager implementation. |
---|
35 | * |
---|
36 | * @{ |
---|
37 | */ |
---|
38 | |
---|
39 | extern const size_t _IO_Number_of_drivers; |
---|
40 | |
---|
41 | extern rtems_driver_address_table _IO_Driver_address_table[]; |
---|
42 | |
---|
43 | extern bool _IO_All_drivers_initialized; |
---|
44 | |
---|
45 | /** |
---|
46 | * @brief Initialization of all device drivers. |
---|
47 | * |
---|
48 | * Initializes all device drivers. |
---|
49 | */ |
---|
50 | void _IO_Initialize_all_drivers( void ); |
---|
51 | |
---|
52 | ISR_LOCK_DECLARE( extern, _IO_Driver_registration_lock ) |
---|
53 | |
---|
54 | RTEMS_INLINE_ROUTINE void _IO_Driver_registration_acquire( |
---|
55 | ISR_lock_Context *lock_context |
---|
56 | ) |
---|
57 | { |
---|
58 | _ISR_lock_ISR_disable_and_acquire( |
---|
59 | &_IO_Driver_registration_lock, |
---|
60 | lock_context |
---|
61 | ); |
---|
62 | } |
---|
63 | |
---|
64 | RTEMS_INLINE_ROUTINE void _IO_Driver_registration_release( |
---|
65 | ISR_lock_Context *lock_context |
---|
66 | ) |
---|
67 | { |
---|
68 | _ISR_lock_Release_and_ISR_enable( |
---|
69 | &_IO_Driver_registration_lock, |
---|
70 | lock_context |
---|
71 | ); |
---|
72 | } |
---|
73 | |
---|
74 | /** @} */ |
---|
75 | |
---|
76 | #ifdef __cplusplus |
---|
77 | } |
---|
78 | #endif /* __cplusplus */ |
---|
79 | |
---|
80 | #endif /* _RTEMS_IOIMPL_H */ |
---|