source: rtems/cpukit/score/Makefile.am @ e358088

4.11
Last change on this file since e358088 was e358088, checked in by Sebastian Huber <sebastian.huber@…>, on May 28, 2013 at 8:54:46 AM

smp: New SMP lock API

Move the SMP lock implementation to the CPU port. An optimal SMP lock
implementation is highly architecture dependent. For example the memory
models may be fundamentally different.

The new SMP lock API has a flaw. It does not provide the ability to use
a local context for acquire and release pairs. Such a context is
necessary to implement for example the Mellor-Crummey and Scott (MCS)
locks. The SMP lock is currently used in _Thread_Disable_dispatch() and
_Thread_Enable_dispatch() and makes them to a giant lock acquire and
release. Since these functions do not pass state information via a
local context there is currently no use case for such a feature.

  • Property mode set to 100644
File size: 13.7 KB
Line 
1include $(top_srcdir)/automake/multilib.am
2include $(top_srcdir)/automake/compile.am
3
4SUBDIRS = cpu
5
6## include
7
8include_rtemsdir = $(includedir)/rtems
9
10include_rtems_HEADERS = include/rtems/debug.h
11include_rtems_HEADERS += include/rtems/system.h
12include_rtems_HEADERS += include/rtems/seterr.h
13include_rtems_HEADERS += include/rtems/bspsmp.h
14
15include_rtems_scoredir = $(includedir)/rtems/score
16
17include_rtems_score_HEADERS = include/rtems/score/address.h
18include_rtems_score_HEADERS += include/rtems/score/apiext.h
19include_rtems_score_HEADERS += include/rtems/score/apimutex.h
20include_rtems_score_HEADERS += include/rtems/score/bitfield.h
21include_rtems_score_HEADERS += include/rtems/score/chain.h
22include_rtems_score_HEADERS += include/rtems/score/context.h
23include_rtems_score_HEADERS += include/rtems/score/copyrt.h
24include_rtems_score_HEADERS += include/rtems/score/corebarrier.h
25include_rtems_score_HEADERS += include/rtems/score/coremsg.h
26include_rtems_score_HEADERS += include/rtems/score/coremutex.h
27include_rtems_score_HEADERS += include/rtems/score/coresem.h
28include_rtems_score_HEADERS += include/rtems/score/heap.h
29include_rtems_score_HEADERS += include/rtems/score/protectedheap.h
30include_rtems_score_HEADERS += include/rtems/score/interr.h
31include_rtems_score_HEADERS += include/rtems/score/isr.h
32include_rtems_score_HEADERS += include/rtems/score/isrlevel.h
33include_rtems_score_HEADERS += include/rtems/score/object.h
34include_rtems_score_HEADERS += include/rtems/score/percpu.h
35include_rtems_score_HEADERS += include/rtems/score/priority.h
36include_rtems_score_HEADERS += include/rtems/score/prioritybitmap.h
37include_rtems_score_HEADERS += include/rtems/score/rbtree.h
38include_rtems_score_HEADERS += include/rtems/score/scheduler.h
39include_rtems_score_HEADERS += include/rtems/score/schedulercbs.h
40include_rtems_score_HEADERS += include/rtems/score/scheduleredf.h
41include_rtems_score_HEADERS += include/rtems/score/schedulerpriority.h
42include_rtems_score_HEADERS += include/rtems/score/schedulersimple.h
43include_rtems_score_HEADERS += include/rtems/score/stack.h
44include_rtems_score_HEADERS += include/rtems/score/states.h
45include_rtems_score_HEADERS += include/rtems/score/sysstate.h
46include_rtems_score_HEADERS += include/rtems/score/thread.h
47include_rtems_score_HEADERS += include/rtems/score/threadq.h
48include_rtems_score_HEADERS += include/rtems/score/threadsync.h
49include_rtems_score_HEADERS += include/rtems/score/timespec.h
50include_rtems_score_HEADERS += include/rtems/score/timestamp.h
51include_rtems_score_HEADERS += include/rtems/score/timestamp64.h
52include_rtems_score_HEADERS += include/rtems/score/tod.h
53include_rtems_score_HEADERS += include/rtems/score/tqdata.h
54include_rtems_score_HEADERS += include/rtems/score/userext.h
55include_rtems_score_HEADERS += include/rtems/score/userextimpl.h
56include_rtems_score_HEADERS += include/rtems/score/watchdog.h
57include_rtems_score_HEADERS += include/rtems/score/wkspace.h
58include_rtems_score_HEADERS += include/rtems/score/cpuopts.h
59include_rtems_score_HEADERS += include/rtems/score/basedefs.h
60include_rtems_score_HEADERS += include/rtems/score/atomic.h
61include_rtems_score_HEADERS += include/rtems/score/genericcpuatomic.h
62include_rtems_score_HEADERS += include/rtems/score/genericatomicops.h
63if HAS_SMP
64include_rtems_score_HEADERS += include/rtems/score/smplock.h
65include_rtems_score_HEADERS += include/rtems/score/smp.h
66endif
67
68if HAS_PTHREADS
69include_rtems_score_HEADERS += include/rtems/score/corespinlock.h
70include_rtems_score_HEADERS += include/rtems/score/corerwlock.h
71endif
72
73if HAS_MP
74# We only build multiprocessing related files if HAS_MP was defined
75include_rtems_score_HEADERS += include/rtems/score/mpci.h
76include_rtems_score_HEADERS += include/rtems/score/mppkt.h
77include_rtems_score_HEADERS += include/rtems/score/objectmp.h
78include_rtems_score_HEADERS += include/rtems/score/threadmp.h
79endif
80
81if HAS_SMP
82include_rtems_score_HEADERS += include/rtems/score/schedulersimplesmp.h
83endif
84
85## inline
86include_rtems_score_HEADERS += inline/rtems/score/address.inl
87include_rtems_score_HEADERS += inline/rtems/score/chain.inl
88include_rtems_score_HEADERS += inline/rtems/score/corebarrier.inl
89include_rtems_score_HEADERS += inline/rtems/score/coremsg.inl
90include_rtems_score_HEADERS += inline/rtems/score/coremutex.inl
91include_rtems_score_HEADERS += inline/rtems/score/coresem.inl
92include_rtems_score_HEADERS += inline/rtems/score/heap.inl
93include_rtems_score_HEADERS += inline/rtems/score/isr.inl
94include_rtems_score_HEADERS += inline/rtems/score/object.inl
95include_rtems_score_HEADERS += inline/rtems/score/priority.inl
96include_rtems_score_HEADERS += inline/rtems/score/prioritybitmap.inl
97include_rtems_score_HEADERS += inline/rtems/score/rbtree.inl
98include_rtems_score_HEADERS += inline/rtems/score/scheduler.inl
99include_rtems_score_HEADERS += inline/rtems/score/schedulerpriority.inl
100include_rtems_score_HEADERS += inline/rtems/score/schedulersimple.inl
101include_rtems_score_HEADERS += inline/rtems/score/stack.inl
102include_rtems_score_HEADERS += inline/rtems/score/states.inl
103include_rtems_score_HEADERS += inline/rtems/score/sysstate.inl
104include_rtems_score_HEADERS += inline/rtems/score/thread.inl
105include_rtems_score_HEADERS += inline/rtems/score/threadq.inl
106include_rtems_score_HEADERS += inline/rtems/score/tod.inl
107include_rtems_score_HEADERS += inline/rtems/score/tqdata.inl
108include_rtems_score_HEADERS += inline/rtems/score/watchdog.inl
109include_rtems_score_HEADERS += inline/rtems/score/wkspace.inl
110include_rtems_score_HEADERS += inline/rtems/score/atomic.inl
111
112if HAS_PTHREADS
113include_rtems_score_HEADERS += inline/rtems/score/corespinlock.inl
114include_rtems_score_HEADERS += inline/rtems/score/corerwlock.inl
115endif
116
117if HAS_MP
118## We only build multiprocessing related files if HAS_MP was defined
119include_rtems_score_HEADERS += inline/rtems/score/mppkt.inl
120include_rtems_score_HEADERS += inline/rtems/score/objectmp.inl
121include_rtems_score_HEADERS += inline/rtems/score/threadmp.inl
122endif
123
124## src
125
126AM_CPPFLAGS += -D__RTEMS_INSIDE__
127
128noinst_LIBRARIES = libscore.a
129libscore_a_SOURCES =
130libscore_a_CPPFLAGS = $(AM_CPPFLAGS)
131
132# We only build multiprocessing related files if HAS_MP was defined
133if HAS_MP
134libscore_a_SOURCES += src/mpci.c src/objectmp.c src/threadmp.c
135endif
136
137if HAS_SMP
138libscore_a_SOURCES += src/isrsmp.c src/smp.c \
139    src/schedulersimplesmpblock.c src/schedulersimplesmpschedule.c \
140    src/schedulersimplesmpunblock.c src/schedulersimplesmptick.c
141endif
142
143## CORE_APIMUTEX_C_FILES
144libscore_a_SOURCES += src/apimutex.c src/apimutexallocate.c \
145    src/apimutexlock.c src/apimutexunlock.c
146
147## CORE_BARRIER_C_FILES
148libscore_a_SOURCES += src/corebarrier.c src/corebarrierrelease.c \
149    src/corebarrierwait.c
150
151## CORE_MESSAGE_QUEUE_C_FILES
152libscore_a_SOURCES += src/coremsg.c src/coremsgbroadcast.c \
153    src/coremsgclose.c src/coremsgflush.c src/coremsgflushwait.c \
154    src/coremsginsert.c src/coremsgflushsupp.c src/coremsgseize.c \
155    src/coremsgsubmit.c
156
157## CORE_MUTEX_C_FILES
158libscore_a_SOURCES += src/coremutex.c src/coremutexflush.c \
159    src/coremutexseize.c src/coremutexsurrender.c \
160    src/coremutexseizeintr.c
161
162## CORE_PERCPU_C_FILES
163libscore_a_SOURCES += src/percpu.c
164libscore_a_SOURCES += src/percpuasm.c
165
166## CORE_RWLOCK_C_FILES
167if HAS_PTHREADS
168libscore_a_SOURCES += src/corerwlock.c src/corerwlockobtainread.c \
169    src/corerwlockobtainwrite.c src/corerwlockrelease.c src/corerwlocktimeout.c
170endif
171
172## CORE_SEMAPHORE_C_FILES
173libscore_a_SOURCES += src/coresem.c src/coresemflush.c src/coresemseize.c \
174    src/coresemsurrender.c
175
176## CORE_SPINLOCK_C_FILES
177if HAS_PTHREADS
178libscore_a_SOURCES += src/corespinlock.c src/corespinlockrelease.c \
179    src/corespinlockwait.c
180endif
181
182## HEAP_C_FILES
183libscore_a_SOURCES += src/heap.c src/heapallocate.c src/heapextend.c \
184    src/heapfree.c src/heapsizeofuserarea.c src/heapwalk.c src/heapgetinfo.c \
185    src/heapgetfreeinfo.c src/heapresizeblock.c src/heapiterate.c \
186    src/heapgreedy.c src/heapnoextend.c
187
188## OBJECT_C_FILES
189libscore_a_SOURCES += src/objectallocate.c src/objectclose.c \
190    src/objectextendinformation.c src/objectfree.c src/objectget.c \
191    src/objectgetisr.c src/objectgetnext.c src/objectinitializeinformation.c \
192    src/objectnametoid.c src/objectnametoidstring.c \
193    src/objectshrinkinformation.c src/objectgetnoprotection.c \
194    src/objectidtoname.c src/objectgetnameasstring.c src/objectsetname.c \
195    src/objectgetinfo.c src/objectgetinfoid.c src/objectapimaximumclass.c \
196    src/objectnamespaceremove.c \
197    src/objectactivecount.c
198
199## SCHEDULER_C_FILES
200libscore_a_SOURCES += src/scheduler.c
201
202## SCHEDULERPRIORITY_C_FILES
203libscore_a_SOURCES += src/schedulerpriority.c \
204    src/schedulerpriorityallocate.c \
205    src/schedulerprioritytick.c \
206    src/schedulerpriorityblock.c \
207    src/schedulerpriorityenqueue.c \
208    src/schedulerpriorityenqueuefirst.c \
209    src/schedulerpriorityextract.c \
210    src/schedulerpriorityfree.c \
211    src/schedulerpriorityprioritycompare.c \
212    src/schedulerpriorityreleasejob.c \
213    src/schedulerpriorityschedule.c \
214    src/schedulerpriorityunblock.c \
215    src/schedulerpriorityupdate.c \
216    src/schedulerpriorityyield.c
217
218## SCHEDULERSIMPLE_C_FILES
219libscore_a_SOURCES += src/schedulersimple.c \
220    src/schedulersimpleblock.c \
221    src/schedulersimpleenqueue.c \
222    src/schedulersimpleenqueuefirst.c \
223    src/schedulersimpleextract.c \
224    src/schedulersimplereadyqueueenqueue.c \
225    src/schedulersimplereadyqueueenqueuefirst.c \
226    src/schedulersimpleschedule.c \
227    src/schedulersimpleunblock.c \
228    src/schedulersimpleyield.c
229
230## SCHEDULEREDF_C_FILES
231libscore_a_SOURCES += src/scheduleredf.c \
232    src/scheduleredfallocate.c \
233    src/scheduleredfblock.c \
234    src/scheduleredfenqueue.c \
235    src/scheduleredfenqueuefirst.c \
236    src/scheduleredfextract.c \
237    src/scheduleredffree.c \
238    src/scheduleredfprioritycompare.c \
239    src/scheduleredfreleasejob.c \
240    src/scheduleredfschedule.c \
241    src/scheduleredfunblock.c \
242    src/scheduleredfupdate.c \
243    src/scheduleredfyield.c
244
245## SCHEDULERCBS_C_FILES
246libscore_a_SOURCES += src/schedulercbs.c \
247    src/schedulercbsallocate.c \
248    src/schedulercbsattachthread.c \
249    src/schedulercbscleanup.c \
250    src/schedulercbscreateserver.c \
251    src/schedulercbsdestroyserver.c \
252    src/schedulercbsdetachthread.c \
253    src/schedulercbsgetapprovedbudget.c \
254    src/schedulercbsgetexecutiontime.c \
255    src/schedulercbsgetparameters.c \
256    src/schedulercbsgetremainingbudget.c \
257    src/schedulercbsgetserverid.c \
258    src/schedulercbssetparameters.c \
259    src/schedulercbsreleasejob.c \
260    src/schedulercbsunblock.c
261
262## PROTECTED_HEAP_C_FILES
263libscore_a_SOURCES += src/pheapallocate.c \
264    src/pheapextend.c src/pheapfree.c src/pheapgetsize.c \
265    src/pheapgetblocksize.c src/pheapgetfreeinfo.c src/pheapgetinfo.c \
266    src/pheapinit.c src/pheapresizeblock.c src/pheapwalk.c src/pheapiterate.c
267
268## RBTREE_C_FILES
269libscore_a_SOURCES += src/rbtree.c \
270    src/rbtreeextract.c src/rbtreefind.c src/rbtreefindheader.c \
271    src/rbtreeget.c src/rbtreeinsert.c src/rbtreeiterate.c src/rbtreenext.c
272
273## THREAD_C_FILES
274libscore_a_SOURCES += src/thread.c src/threadchangepriority.c \
275    src/threadclearstate.c src/threadclose.c src/threadcreateidle.c \
276    src/threaddelayended.c src/threaddispatch.c \
277    src/threadenabledispatch.c src/threaddisabledispatch.c \
278    src/threadget.c src/threadhandler.c src/threadinitialize.c \
279    src/threadloadenv.c src/threadready.c src/threadreset.c \
280    src/threadrestart.c src/threadsetpriority.c \
281    src/threadsetstate.c src/threadsettransient.c \
282    src/threadstackallocate.c src/threadstackfree.c src/threadstart.c \
283    src/threadstartmultitasking.c src/iterateoverthreads.c \
284    src/threadblockingoperationcancel.c
285   
286if HAS_SMP
287libscore_a_SOURCES += src/threaddispatchdisablelevel.c
288endif
289
290## THREADQ_C_FILES
291libscore_a_SOURCES += src/threadq.c src/threadqdequeue.c \
292    src/threadqdequeuefifo.c src/threadqdequeuepriority.c \
293    src/threadqenqueue.c src/threadqenqueuefifo.c \
294    src/threadqenqueuepriority.c src/threadqextract.c \
295    src/threadqextractfifo.c src/threadqextractpriority.c \
296    src/threadqextractwithproxy.c src/threadqfirst.c src/threadqfirstfifo.c \
297    src/threadqfirstpriority.c src/threadqflush.c src/threadqrequeue.c \
298    src/threadqprocesstimeout.c src/threadqtimeout.c
299
300## TIMESPEC_C_FILES
301libscore_a_SOURCES += src/timespecaddto.c src/timespecfromticks.c \
302    src/timespecisvalid.c src/timespeclessthan.c \
303    src/timespecsubtract.c src/timespectoticks.c src/timespecdivide.c \
304    src/timespecdividebyinteger.c
305
306## TIMESTAMP_INT64_C_FILES
307libscore_a_SOURCES += src/ts64addto.c src/ts64dividebyinteger.c \
308    src/ts64divide.c src/ts64equalto.c \
309    src/ts64getnanoseconds.c src/ts64getseconds.c \
310    src/ts64lessthan.c \
311    src/ts64set.c src/ts64settozero.c src/ts64subtract.c \
312    src/ts64toticks.c src/ts64totimespec.c src/ts64totimeval.c
313
314## TOD_C_FILES
315libscore_a_SOURCES += src/coretod.c src/coretodset.c src/coretodget.c \
316    src/coretodgetuptimetimespec.c src/coretodtickle.c \
317    src/coretodmsecstoticks.c src/coretodtickspersec.c src/coretodusectoticks.c
318
319## WATCHDOG_C_FILES
320libscore_a_SOURCES += src/watchdog.c src/watchdogadjust.c \
321    src/watchdogadjusttochain.c src/watchdoginsert.c src/watchdogremove.c \
322    src/watchdogtickle.c src/watchdogreport.c src/watchdogreportchain.c \
323    src/watchdognanoseconds.c
324
325## USEREXT_C_FILES
326libscore_a_SOURCES += src/userextaddset.c \
327    src/userext.c src/userextremoveset.c src/userextiterate.c
328
329## STD_C_FILES
330libscore_a_SOURCES += src/apiext.c src/chain.c src/chainappend.c \
331    src/chainextract.c src/chainget.c src/chaininsert.c \
332    src/chainappendempty.c src/chainprependempty.c src/chaingetempty.c \
333    src/chainnodecount.c \
334    src/interr.c src/isr.c src/wkspace.c src/wkstringduplicate.c
335
336EXTRA_DIST = src/Unlimited.txt
337
338DISTCLEANFILES = include/rtems/score/cpuopts.h
339
340include $(srcdir)/preinstall.am
341include $(top_srcdir)/automake/subdirs.am
342include $(top_srcdir)/automake/local.am
Note: See TracBrowser for help on using the repository browser.