OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [devapi-synchronization-levels.html] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>Synchronization Levels</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="Device Driver Interface to the Kernel"
23
HREF="devapi-device-driver-interface-to-the-kernel.html"><LINK
24
REL="PREVIOUS"
25
TITLE="Device Driver Models"
26
HREF="devapi-device-driver-models.html"><LINK
27
REL="NEXT"
28
TITLE="The API"
29
HREF="devapi-api.html"></HEAD
30
><BODY
31
CLASS="SECTION"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="devapi-device-driver-models.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Chapter 18. Device Driver Interface to the Kernel</TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="devapi-api.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="SECTION"
82
><H1
83
CLASS="SECTION"
84
><A
85
NAME="DEVAPI-SYNCHRONIZATION-LEVELS">Synchronization Levels</H1
86
><P
87
>Since it would be dangerous for an ISR or DSR to make a call
88
that might reschedule the current thread (by trying to lock a mutex
89
for example) all functions in this API have an associated synchronization
90
level. These levels are:</P
91
><P
92
></P
93
><DIV
94
CLASS="VARIABLELIST"
95
><DL
96
><DT
97
>Thread</DT
98
><DD
99
><P
100
>      This function may only be called from within threads. This is
101
      usually the client code that makes calls into the device driver.
102
      In a non-kernel configuration, this will be code running at the
103
      default non-interrupt level.
104
      </P
105
></DD
106
><DT
107
>DSR</DT
108
><DD
109
><P
110
>      This function may be called by either DSR or thread code.
111
      </P
112
></DD
113
><DT
114
>ISR</DT
115
><DD
116
><P
117
>      This function may be called from ISR, DSR or thread code.
118
      </P
119
></DD
120
></DL
121
></DIV
122
><P
123
>The following table shows, for each API function, the levels
124
at which is may be called:</P
125
><TABLE
126
BORDER="5"
127
BGCOLOR="#E0E0F0"
128
WIDTH="70%"
129
><TR
130
><TD
131
><PRE
132
CLASS="PROGRAMLISTING"
133
>                                  Callable from:
134
Function                       ISR     DSR    Thread
135
-------------------------------------------------------------------------
136
 
137
cyg_drv_isr_lock                X       X       X
138
cyg_drv_isr_unlock              X       X       X
139
cyg_drv_spinlock_init                           X
140
cyg_drv_spinlock_destroy                        X
141
cyg_drv_spinlock_spin           X       X       X
142
cyg_drv_spinlock_clear          X       X       X
143
cyg_drv_spinlock_try            X       X       X
144
cyg_drv_spinlock_test           X       X       X
145
cyg_drv_spinlock_spin_intsave   X       X       X
146
cyg_drv_spinlock_clear_intsave  X       X       X
147
cyg_drv_dsr_lock                        X       X
148
cyg_drv_dsr_unlock                      X       X
149
cyg_drv_mutex_init                              X
150
cyg_drv_mutex_destroy                           X
151
cyg_drv_mutex_lock                              X
152
cyg_drv_mutex_trylock                           X
153
cyg_drv_mutex_unlock                            X
154
cyg_drv_mutex_release                           X
155
cyg_drv_cond_init                               X
156
cyg_drv_cond_destroy                            X
157
cyg_drv_cond_wait                               X
158
cyg_drv_cond_signal                     X       X
159
cyg_drv_cond_broadcast                  X       X
160
cyg_drv_interrupt_create                        X
161
cyg_drv_interrupt_delete                        X
162
cyg_drv_interrupt_attach        X       X       X
163
cyg_drv_interrupt_detach        X       X       X
164
cyg_drv_interrupt_mask          X       X       X
165
cyg_drv_interrupt_unmask        X       X       X
166
cyg_drv_interrupt_acknowledge   X       X       X
167
cyg_drv_interrupt_configure     X       X       X
168
cyg_drv_interrupt_level         X       X       X
169
cyg_drv_interrupt_set_cpu       X       X       X
170
cyg_drv_interrupt_get_cpu       X       X       X&#13;</PRE
171
></TD
172
></TR
173
></TABLE
174
></DIV
175
><DIV
176
CLASS="NAVFOOTER"
177
><HR
178
ALIGN="LEFT"
179
WIDTH="100%"><TABLE
180
SUMMARY="Footer navigation table"
181
WIDTH="100%"
182
BORDER="0"
183
CELLPADDING="0"
184
CELLSPACING="0"
185
><TR
186
><TD
187
WIDTH="33%"
188
ALIGN="left"
189
VALIGN="top"
190
><A
191
HREF="devapi-device-driver-models.html"
192
ACCESSKEY="P"
193
>Prev</A
194
></TD
195
><TD
196
WIDTH="34%"
197
ALIGN="center"
198
VALIGN="top"
199
><A
200
HREF="ecos-ref.html"
201
ACCESSKEY="H"
202
>Home</A
203
></TD
204
><TD
205
WIDTH="33%"
206
ALIGN="right"
207
VALIGN="top"
208
><A
209
HREF="devapi-api.html"
210
ACCESSKEY="N"
211
>Next</A
212
></TD
213
></TR
214
><TR
215
><TD
216
WIDTH="33%"
217
ALIGN="left"
218
VALIGN="top"
219
>Device Driver Models</TD
220
><TD
221
WIDTH="34%"
222
ALIGN="center"
223
VALIGN="top"
224
><A
225
HREF="devapi-device-driver-interface-to-the-kernel.html"
226
ACCESSKEY="U"
227
>Up</A
228
></TD
229
><TD
230
WIDTH="33%"
231
ALIGN="right"
232
VALIGN="top"
233
>The API</TD
234
></TR
235
></TABLE
236
></DIV
237
></BODY
238
></HTML
239
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.