summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/smplock.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove make preinstallChris Johns2018-01-251-327/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* score: Improve SMP lock debug supportSebastian Huber2017-01-111-3/+14
| | | | | The CPU index starts with zero. Increment it by one, to allow global SMP locks to reside in the BSS section.
* score: Inline some SMP lock operations by defaultSebastian Huber2016-11-091-11/+18
| | | | | | | | | The SMP ticket lock release turned out to be suitable for inlining, e.g. a hand full of instructions, no branches. The changes in the screen files do not reflect the changes due to this commit. However, they are now up to date. Obtained on a T4240 running at 1.5GHz using GCC 7.0.0 20161108..
* score: Default to non-inline SMP lock opsSebastian Huber2016-11-041-54/+64
| | | | | Use non-inline SMP lock acquire and release operations by default. Provide inline variants for the hot spots, e.g. mutex acquire/release.
* score: Rename _ISR_Disable_without_giant()Sebastian Huber2016-05-201-2/+2
| | | | | | | | | Rename _ISR_Disable_without_giant() into _ISR_Local_disable(). Rename _ISR_Enable_without_giant() into _ISR_Local_enable(). This is a preparation to remove the Giant lock. Update #2555.
* SMP: Move ticket lock to separate header fileSebastian Huber2016-05-191-160/+1
|
* SMP: Move lock stats to separate header fileSebastian Huber2016-05-191-330/+29
|
* score: Ensure matching lock acquire and releaseSebastian Huber2016-05-121-3/+4
| | | | | Ensure matching lock acquire and release for SMP locks if RTEMS_DEBUG is defined.
* score: Add _ISR_lock_Is_owner()Sebastian Huber2016-05-121-3/+45
|
* SMP: Optimize ticket lock implementationSebastian Huber2015-10-021-1/+1
| | | | | | | | This reverts the relevant part of commit da06fe948c0878057e5f563ebd3dfe40c0f1b0d2. The acquire/release order is superfluous for the next ticket increment. The mutual exclusion is guaranteed by the acquire load from and release store to the next serving atomic variable.
* score: Simplify _SMP_ticket_lock_Release()Sebastian Huber2015-07-011-11/+13
| | | | | Add a SMP lock statistics pointer to SMP_lock_Stats_context and drop the SMP lock statistics parameter from _SMP_ticket_lock_Release().
* score: Hide SMP lock profiling impl if disabledSebastian Huber2015-06-261-68/+107
| | | | The problem is that empty structures have a different size in C and C++.
* score: Do not inline SMP lock if profiling enabledSebastian Huber2015-05-191-1/+56
| | | | This reduces the code size drastically.
* score: Allow NULL for SMP lock nameSebastian Huber2015-03-061-1/+1
|
* score: Fix SMP lock implementationSebastian Huber2015-03-061-1/+1
| | | | | | | | See also: https://nahratzah.wordpress.com/2012/10/12/a-trivial-fair-spinlock/ http://concurrencyfreaks.blogspot.de/2014/05/relaxed-atomics-optimizations-for.html
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* score: Add SMP lock profiling supportSebastian Huber2014-03-141-17/+392
|
* score: Add function to destroy SMP locksSebastian Huber2014-03-111-4/+28
|
* score: Add local context to SMP lock APISebastian Huber2014-03-111-33/+104
| | | | | | | | | | | Add a local context structure to the SMP lock API for acquire and release pairs. This context can be used to store the ISR level and profiling information. It may be later used to enable more sophisticated lock algorithms, e.g. MCS locks. There is only one lock that cannot be used with a local context. This is the per-CPU lock since here we would have to transfer the local context through a context switch which is very complicated.
* score: Use atomic API for SMP lockSebastian Huber2014-02-171-15/+36
| | | | | Use a ticket lock implementation based on atomic operations. Delete CPU port specific SMP lock implementations.
* score: Move ISR level content to single fileSebastian Huber2013-07-221-1/+1
|
* documentation: Fix Doxygen commentsSebastian Huber2013-06-141-4/+4
|
* score: Always provide <rtems/score/smplock.h>Sebastian Huber2013-06-121-0/+6
|
* smp: New SMP lock APISebastian Huber2013-05-311-100/+74
| | | | | | | | | | | | | | 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.
* cpukit: Add EOL on files missing EOL at EOFJoel Sherrill2013-01-101-1/+1
|
* score: Doxygen Clean Up Task #3Mathew Kallada2013-01-041-10/+12
|
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+0
| | | | | | | | | | | | Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
* 2011-10-17 Daniel Hellstrom <daniel@gaisler.com>Jennifer Averett2011-10-171-0/+1
| | | | | | | PR 1935/cpukit * score/include/rtems/score/smplock.h, score/src/smplock.c: SMP nested count variable was being overritten when nested lock was taken more than once.
* 2011-08-01 Jennifer Averett <Jennifer.Averett@OARcorp.com>Jennifer Averett2011-08-011-4/+6
| | | | * score/include/rtems/score/smplock.h: Fix comments.
* 2011-06-17 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-06-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rtems/include/rtems/rtems/types.h, score/include/rtems/score/address.h, score/include/rtems/score/apiext.h, score/include/rtems/score/bitfield.h, score/include/rtems/score/context.h, score/include/rtems/score/corebarrier.h, score/include/rtems/score/coremsg.h, score/include/rtems/score/coremutex.h, score/include/rtems/score/corerwlock.h, score/include/rtems/score/coresem.h, score/include/rtems/score/corespinlock.h, score/include/rtems/score/interr.h, score/include/rtems/score/isr.h, score/include/rtems/score/mpci.h, score/include/rtems/score/mppkt.h, score/include/rtems/score/objectmp.h, score/include/rtems/score/percpu.h, score/include/rtems/score/priority.h, score/include/rtems/score/rbtree.h, score/include/rtems/score/scheduler.h, score/include/rtems/score/smp.h, score/include/rtems/score/smplock.h, score/include/rtems/score/stack.h, score/include/rtems/score/states.h, score/include/rtems/score/thread.h, score/include/rtems/score/threadq.h, score/include/rtems/score/threadsync.h, score/include/rtems/score/timespec.h, score/include/rtems/score/timestamp.h, score/include/rtems/score/timestamp64.h, score/include/rtems/score/tod.h, score/include/rtems/score/tqdata.h, score/include/rtems/score/watchdog.h, score/include/rtems/score/wkspace.h: Mark Score files as in Score Group to improve Doxygen output.
* Remove white-spaces.Ralf Corsepius2011-05-241-3/+3
|
* 2011-05-20 Jennifer Averett <Jennifer.Averett@OARcorp.com>Jennifer Averett2011-05-201-18/+67
| | | | | | | PR 1787/cpukit * score/include/rtems/score/percpu.h, score/include/rtems/score/smplock.h, score/src/smp.c, score/src/smplock.c: Add nesting support to smp spinlock.
* 2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>Joel Sherrill2011-03-161-0/+95
PR 1729/cpukit * configure.ac, sapi/include/confdefs.h, sapi/src/exinit.c, score/Makefile.am, score/preinstall.am, score/cpu/i386/rtems/score/cpu.h, score/cpu/sparc/cpu_asm.S, score/cpu/sparc/rtems/score/cpu.h, score/include/rtems/score/basedefs.h, score/include/rtems/score/context.h, score/include/rtems/score/percpu.h, score/src/percpu.c, score/src/thread.c, score/src/threadcreateidle.c: Add next step in SMP support. This adds an allocated array of the Per_CPU structures to support multiple cpus vs a single instance of the structure which is still used if SMP support is disabled. Configuration support is also added to explicitly enable or disable SMP. But SMP can only be enabled for the CPUs which will support it initially -- SPARC and i386. With the stub BSP support, a BSP can be run as a single core SMP system from an RTEMS data structure standpoint. * aclocal/check-smp.m4, aclocal/enable-smp.m4, score/include/rtems/bspsmp.h, score/include/rtems/score/smplock.h, score/src/smp.c, score/src/smplock.c: New files.