5
Last change
on this file since 18ff889 was
18ff889,
checked in by Sebastian Huber <sebastian.huber@…>, on 03/14/16 at 09:11:38
|
score: Use ISR lock for IO driver registration
Create implementation header file.
Update #2555.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Classic Input/Output Manager Implementation API |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * COPYRIGHT (c) 1989-2008. |
---|
9 | * On-Line Applications Research Corporation (OAR). |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.org/license/LICENSE. |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef _RTEMS_IOIMPL_H |
---|
17 | #define _RTEMS_IOIMPL_H |
---|
18 | |
---|
19 | #include <rtems/io.h> |
---|
20 | #include <rtems/score/isrlock.h> |
---|
21 | |
---|
22 | #ifdef __cplusplus |
---|
23 | extern "C" { |
---|
24 | #endif /* __cplusplus */ |
---|
25 | |
---|
26 | extern const size_t _IO_Number_of_drivers; |
---|
27 | |
---|
28 | extern rtems_driver_address_table _IO_Driver_address_table[]; |
---|
29 | |
---|
30 | extern bool _IO_All_drivers_initialized; |
---|
31 | |
---|
32 | /** |
---|
33 | * @brief Initialization of all device drivers. |
---|
34 | * |
---|
35 | * Initializes all device drivers. |
---|
36 | */ |
---|
37 | void _IO_Initialize_all_drivers( void ); |
---|
38 | |
---|
39 | ISR_LOCK_DECLARE( extern, _IO_Driver_registration_lock ) |
---|
40 | |
---|
41 | RTEMS_INLINE_ROUTINE void _IO_Driver_registration_acquire( |
---|
42 | ISR_lock_Context *lock_context |
---|
43 | ) |
---|
44 | { |
---|
45 | _ISR_lock_ISR_disable_and_acquire( |
---|
46 | &_IO_Driver_registration_lock, |
---|
47 | lock_context |
---|
48 | ); |
---|
49 | } |
---|
50 | |
---|
51 | RTEMS_INLINE_ROUTINE void _IO_Driver_registration_release( |
---|
52 | ISR_lock_Context *lock_context |
---|
53 | ) |
---|
54 | { |
---|
55 | _ISR_lock_Release_and_ISR_enable( |
---|
56 | &_IO_Driver_registration_lock, |
---|
57 | lock_context |
---|
58 | ); |
---|
59 | } |
---|
60 | |
---|
61 | #ifdef __cplusplus |
---|
62 | } |
---|
63 | #endif /* __cplusplus */ |
---|
64 | |
---|
65 | #endif /* _RTEMS_IOIMPL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.