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

4.11
Last change on this file since d19cce29 was d19cce29, checked in by Sebastian Huber <sebastian.huber@…>, on Aug 5, 2013 at 12:54:11 PM

score: Per-CPU thread dispatch disable level

Use a per-CPU thread dispatch disable level. So instead of one global
thread dispatch disable level we have now one instance per processor.
This is a major performance improvement for SMP. On non-SMP
configurations this may simplifiy the interrupt entry/exit code.

The giant lock is still present, but it is now decoupled from the thread
dispatching in _Thread_Dispatch(), _Thread_Handler(),
_Thread_Restart_self() and the interrupt entry/exit. Access to the
giant lock is now available via _Giant_Acquire() and _Giant_Release().
The giant lock is still implicitly acquired via
_Thread_Dispatch_decrement_disable_level().

The giant lock is only acquired for high-level operations in interrupt
handlers (e.g. release of a semaphore, sending of an event).

As a side-effect this change fixes the lost thread dispatch necessary
indication bug in _Thread_Dispatch().

A per-CPU thread dispatch disable level greatly simplifies the SMP
support for the interrupt entry/exit code since no spin locks have to be
acquired in this area. It is only necessary to get the current
processor index and use this to calculate the address of the own per-CPU
control. This reduces the interrupt latency considerably.

All elements for the interrupt entry/exit code are now part of the
Per_CPU_Control structure: thread dispatch disable level, ISR nest level
and thread dispatch necessary. Nothing else is required (except CPU
port specific stuff like on SPARC).

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