Imported Upstream version 6.10.0.49

Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-16 16:38:04 +00:00
parent d94e79959b
commit 468663ddbb
48518 changed files with 2789335 additions and 61176 deletions

View File

@@ -0,0 +1,13 @@
# Git repo attributes.
# need LF enforced to make cygwin work
*.sh text eol=lf
*.ac text eol=lf
*.am text eol=lf
*.m4 text eol=lf
# Ensure all text files have normalized (LF) line endings in the repository.
* text=auto
# Note: "core.eol" configuration variable controls which line endings to use
# for the normalized files in the working directory (the default is native).

66
external/bdwgc/libatomic_ops/.gitignore vendored Normal file
View File

@@ -0,0 +1,66 @@
# Ignored files in libatomic_ops Git repo.
Makefile
/pkgconfig/atomic_ops.pc
/pkgconfig/atomic_ops-uninstalled.pc
/autom4te.cache/
/config.cache
/config.log
/config.status
/libatomic_ops-*
*.a
*.dll
*.exe
*.gcda
*.gch
*.gcno
*.la
*.lib
*.lo
*.o
*.obj
*.so
/src/.deps/
/src/.libs/
/src/config.h
/src/config.h.in~
/src/stamp-h1
/tests/.deps/
/tests/core
/tests/list_atomic.i
/tests/test_atomic
/tests/test_atomic_pthreads
/tests/test_malloc
/tests/test_stack
# External library (without trailing slash to allow symlinks):
/pthreads-w32*
# These files are generated by autoreconf:
/aclocal.m4
/compile
/config.guess
/config.sub
/configure
/depcomp
/install-sh
/missing
/mkinstalldirs
/src/config.h.in
/test-driver
Makefile.in
# Generated by libtoolize:
/libtool
/ltmain.sh
/m4/*.m4
# These files are generated by make check:
/tests/list_atomic.c
/tests/test_atomic_include.h
/tests/test*.log
/tests/test*.trs

40
external/bdwgc/libatomic_ops/AUTHORS vendored Normal file
View File

@@ -0,0 +1,40 @@
Originally written by Hans Boehm, with some platform-dependent code
imported from the Boehm-Demers-Weiser GC, where it was contributed
by many others.
Currently maintained by Ivan Maidanski.
Andreas Tobler <a.tobler@schweiz.org>
Andrew Agno <agno+boehmgc@agno.net>
Bradley Smith <brad@brad-smith.co.uk>
Bruce Mitchener <bruce.mitchener@gmail.com>
Carlos O'Donell <carlos@baldric.uwo.ca>
Daniel Grayson <dan@math.uiuc.edu>
Doug Lea <dl@cs.oswego.edu>
Earl Chew <earl_chew@agilent.com>
Emmanuel Stapf <manus@eiffel.com>
Gilles Talis <gilles.talis@gmail.com>
Gregory Farnum <gregory.farnum@dreamhost.com>
H.J. Lu <hjl.tools@gmail.com>
Hans Boehm <boehm@acm.org>
Hans-Peter Nilsson <hp@gcc.gnu.org>
Ian Wienand <ianw@gelato.unsw.edu.au>
Ivan Maidanski <ivmai@mail.ru>
Jeremy Huddleston <jeremyhu@apple.com>
Jim Marshall <jim.marshall@wbemsolutions.com>
Joerg Wagner <wagner@it.neclab.eu>
Linas Vepstas <linasvepstas@gmail.com>
Luca Barbato <lu_zero@gentoo.org>
Maged Michael <michael@cs.rochester.edu>
Manuel Serrano <Manuel.Serrano@inria.fr>
Michael Hope <michael.hope@linaro.org>
Patrick Marlier <patrick.marlier@unine.ch>
Petter Urkedal <urkedal@nbi.dk>
Philipp Zambelli <pzamb@iicm.edu>
Ranko Zivojnovic <ranko@spidernet.net>
Roger Hoover <roger.hoover@gmail.com>
Sebastian Siewior <sebastian@breakpoint.cc>
Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Thorsten Glaser <tg@debian.org>
Tony Mantler <nicoya@ubb.ca>
Yvan Roux <yvan.roux@linaro.org>

340
external/bdwgc/libatomic_ops/COPYING vendored Normal file
View File

@@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

324
external/bdwgc/libatomic_ops/ChangeLog vendored Normal file
View File

@@ -0,0 +1,324 @@
== [7.4.2] 2014-05-02 ==
* Fix a typo in doc/README.txt (remove redundant "an" article).
* Update emails/links due to project site transition.
== [7.4.0] 2013-11-17 ==
* Add and/or/xor entries to list_atomic (tests).
* Add char/short/int/AO_double_t and dd_acquire cases to list_atomic (tests).
* Add compile-time assertion for size of 'standard' AO_double_t.
* Add double_store pthread-based implementation and tests.
* Add generalized CAS primitives of char/short/int size.
* Add generalized atomic and/or/xor operations for char/short/int types.
* Add generalized fetch_and_add_acquire/release (for ARMv6+).
* Add generic implementation of double_load primitives.
* Add information about AO_ASSUME_VISTA to README_win32.
* Add internal header containing only char/short/int/AO_t atomic loads.
* Add load/store primitives generalization based on CAS.
* Add lock-based implementation of char/short/int_fetch_compare_and_swap.
* Add makefile rule to test list_atomic.template syntax (tests).
* Add missing 'const' in aligned-atomic XSIZE_load implementation.
* Add missing double_compare_and_swap to generalization.
* Add missing generalization of no-barrier CAS in template.
* Add negative double-CAS test cases to test_atomic_include (tests).
* Add test_stack to Makefile.msft (tests).
* Adjust fprintf arguments type matching specifier in test_stack (tests).
* Adjust included filenames in atomic_ops_malloc and test_stack.
* Adjust quotes in echo command of Makefile.msft (Win32).
* Always use 'mfence' for nop_full if target CPU supports SSE2 (gcc/x86).
* Better document configure THREADDLLIBS variable.
* Cast away volatile on dereference in CAS-based generalization primitives.
* Change policy regarding version numbers ("micro" part instead of "alpha").
* Convert README to Markdown format.
* Define AO_NO_PTHREADS in configure if no pthreads (Win32 and VxWorks).
* Define AO_int_X operations for ARM and avr32.
* Define double-wide ordered loads/stores for x86.
* Define int_and/or/xor primitives in ao_t_is_int header.
* Define nop_full as compiler barrier for pre-ARMv6 single-core case.
* Do not duplicate BUILT_SOURCES entries in nobase_private_HEADERS (Makefile).
* Do not include standard_ao_double_t.h where double-CAS is unimplemented.
* Do not report absence of meaningless nop, load and store in test_atomic.
* Do not use deprecated AO_T and AO_TS_T (tests).
* Eliminate 'missing initializer' warning for AO_stack_t value initializer.
* Eliminate 64-bit compiler warnings in atomic_ops_malloc.
* Eliminate arithmetic shifts in double-CAS (gcc/arm, msftc/x86).
* Eliminate warning for fetch_and_add argument in test_atomic_include (tests).
* Enable Makefile.msft for Win64.
* Enable build using toolchain without pthreads.
* Enable double_compare_and_swap for non-cpp code (msftc/x86.h).
* Enable generalization of all variants of CAS via fetch_compare_and_swap.
* Enable test_stack for pthreads-w32 and Win32 with native threads.
* Fix generalized AO_char/short_compare_and_swap args (missing 'unsigned').
* Fix makefile sed rule for list_atomic (tests).
* Fix missing abort() usage in atomic_ops_malloc and tests on WinCE.
* Generalize compare_double_and_swap_double using double_compare_and_swap.
* Generalize double_load/store for x86_64 (GCC).
* Generate ao_t_is_int, 'loadstore' headers from templates.
* Generate generalized AO_t load/store/fetch_and_add primitives from template.
* Generate ordered_loads/stores_only headers from templates.
* Group all X_acquire_release_volatile.h and X_[aligned_]atomic_load_store.h.
* Implement and/or/xor, AO_double_load for ARM.
* Implement atomic store using direct write by default on ARMv6+.
* Implement char/short/int-wide primitives using GCC built-in atomic/sync.
* Implement char/short/int_fetch_and_add for msftc/x86[_64] (Win32).
* Implement char/short_fetch_and_add, char/short_load for ARMv6+ (GCC).
* Implement char/short_store primitives at aligned addresses for ARM.
* Implement compare_double_and_swap_double for SunCC/x86.
* Implement double_load/store based on guaranteed x86 access atomicity.
* Implement double_store for ARMv7 using LDREXD/STREXD.
* Implement load/store via simple LDR/STR for ARMv6+ (msftc).
* Implement nop_full/write using 'dmb' instruction if available (gcc/arm).
* Improve debug printing in test_stack (tests).
* Log messages to stdout instead of stderr (tests).
* Make AO_ASSUME_VISTA also enables Win98 code in msftc/x86.h (Win32).
* Minimize gcc/generic-arithm template by factoring out barriers.
* Move 'unsigned' keyword to XCTYPE in generalize-small template.
* Move default compiler options to CFLAGS in Makefile.msft (Win32).
* Move definitions of ordered loads/stores to inner separate headers.
* Move gcc-generic AO_t-wide primitives to generic-small/arithm headers.
* Move generalized arithmetical primitives to 'generalize-arithm' template.
* Optimize AO_spin manually to minimize compiler influence on its duration.
* Parameterize list_atomic template with XSIZE (tests).
* Perform only few list reversals in test_malloc if AO based on pthreads.
* Put autogen.sh to 'dist' package (Automake).
* Remote duplicate definition of test_and_set_acquire in generalize.h.
* Remove X_aligned_atomic_load_store headers and template.
* Remove duplicate AO_spin and AO_pause definition in atomic_ops_stack.
* Remove gcc/x86_64.h eliminating code duplication of gcc/x86.h.
* Remove nested AO_USE_PTHREAD_DEFS macro check in atomic_ops.h (gcc/arm).
* Remove redundant 'cc' clobber for LDREXD instruction (gcc/arm).
* Remove store_full from msftc/arm.h in favor of generalized primitive.
* Remove sunc/x86_64.h eliminating code duplication of sunc/x86.h.
* Remove unsafe emulation-based implementation of double CAS (SunCC/x86_64).
* Remove useless 'perror' call in run_parallel.h (tests).
* Reorder AO_double_t union elements for AO_DOUBLE_T_INITIALIZER portability.
* Replace atomic_load_store.template with atomic_load and atomic_store ones.
* Replace some FIXME items with TODO in atomic_ops.c and sysdeps headers.
* Specify fetch_and_add/sub1 result as unused in test_atomic (tests).
* Support AArch64 (64-bit ARM) target (GCC).
* Support ARMv8 target (gcc/arm).
* Test double_compare_and_swap in test_atomic (tests).
* Use AO_ prefix for internal functions in arm_v6.h, hppa.h.
* Use __atomic GCC built-in to implement generic double-wide CAS.
* Use built-in __sync CAS for double-CAS if AO_USE_SYNC_CAS_BUILTIN for x86.
* Workaround GCC 4.4.3 warning reported for 'val' of list_atomic.c (tests).
== [7.3alpha2] 2012-05-11 ==
* Add '-no-undefined' to LDFLAGS in src/Makefile.am.
* Add AO_and, AO_xor atomic operations.
* Add AO_fetch_compare_and_swap primitives.
* Add and fill in AUTHORS, TODO files.
* Add autogen.sh file.
* Adjust AO_..._H macros in public headers.
* Code refactoring of gcc/arm.h by introducing AO_ARM_HAVE_x macros.
* Define AO macros for libatomic_ops version identification.
* Do not define NDEBUG if '--enable-assertions' passed to configure.
* Eliminate compiler warnings in various functions and macros.
* Generalize AO_compare_and_swap primitives via AO_fetch_compare_and_swap.
* Generalize acquire/release/full CAS primitives for MIPS
* Implement fetch_and_add, test_and_set primitives for MIPS.
* Improve Makefile for MS VC++; pass '-W3' option to MS compiler.
* Include ao_t_is_int.h from atomic_ops.h after first generalization pass
* Merge all Makefile.am files in src tree.
* Minor code refactoring of atomic_ops.c, generic_pthread.h.
* Minor configure build improvements (e.g., ensure proper autoconf version).
* Place only major per-release changes description to ChangeLog (this file).
* Recognize AO_PREFER_GENERALIZED macro to favor generalization over assembly.
* Remove all auto-generated files except for generalize-small.h from the repo.
* Remove duplicate doc/COPYING and empty NEWS files.
* Replace atomic_ops_malloc static mmap-related empty functions with macros.
* Replace pointer relational comparisons with non-pointer ones.
* Require autoconf 2.61 instead of v2.64.
* Show extra compiler warnings (GCC only).
* Turn off AO primitives inlining if AO_NO_INLINE defined.
* Use __builtin_expect in CAS failure loop condition checks (GCC only).
== [7.2f] 2014-05-02 ==
* Fix a typo in doc/README.txt (remove redundant "an" article).
* Regenerate configure files by new automake (v1.14.1), libtool (v2.4.2.418).
== [7.2e] 2013-11-10 ==
* Fix (remove) invalid include of read_ordered.h for ARM.
* Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1.
* Fix AO_pause sleep delay for particular argument values (Win32).
* Fix ARMv7 LDREXD/STREXD double-wide operand specification (GCC/Clang).
* Fix LDREXD/STREXD use for pre-Clang3.3/arm.
* Fix README regarding _acquire_read barrier.
* Fix XSIZE_load/store definition order in generalize-small template.
* Fix asm constraint of CAS memory operand for gcc/alpha, clang-3.1/mips.
* Fix asm constraints of primitives in sunc/x86.h.
* Fix cmpxchg16b-based compare_double_and_swap_double for SunCC/x86_64.
* Fix compare_double_and_swap_double and double_ptr_storage for gcc/x32.
* Fix compare_double_and_swap_double for clang3.0/x86 in PIC mode.
* Fix compare_double_and_swap_double_full definition condition in emul_cas.
* Fix generalize-small template adding missed CAS-based fetch_and_add.
* Fix generalized fetch_and_add function.
* Fix missing compiler barrier in nop_full for uniprocessor ARM.
* Fix ordered_except_wr header inclusion for s390.
* Fix return type of AO_int_X primitives defined in ao_t_is_int header.
* Fix return type of char/short/int_load_read() in read_ordered.h.
* Fix template-based headers regeneration order in src/Makefile.
* Fix typos in ao_t_is_int, atomic_ops.h, generalize.h, msftc/arm.h comments.
* Fix variable type to match printf format specifier in test_stack.
* Fix visibility and initial value of 'dummy' variable in atomic_ops_stack.
* Terminate tests with abort after error reported.
== [7.2d] 2012-08-09 ==
* Fix AO_compare_double_and_swap_double_full for gcc-4.2.1/x86 in PIC mode.
* Fix AO_compiler_barrier missing parentheses.
* Fix missing 'unsigned' for generalized AO_char/short_fetch_and_add result.
== [7.2] 2012-05-11 ==
* Add atomic_ops.pc.in and atomic_ops-uninstalled.pc.in to pkgconfig folder.
* Define and use AO_PTRDIFF_T in tests for casts between pointer and integer.
* Fix AO_compare_and_swap return type for s390 and PowerPC.
* Fix AO_compare_double_and_swap_double_full for gcc/x86 (PIC mode).
* Fix AO_stack_push_release to workaround bug in clang-1.1/x86 compiler.
* Fix AO_test_and_setXX in tests/list_atomic.template.
* Fix AO_test_and_set_full (gcc/x86[_64].h) to work-around a bug in LLVM v2.7.
* Fix AO_test_and_set_full on m68k.
* Fix __ARM_ARCH_5__ macro handling for Android NDK (ARMv7).
* Fix configure for Cygwin, mingw-w64/32.
* Fix configure to define __PIC__ macro explicitly if needed (GCC).
* Fix double_ptr_storage definition for GCC pre-v4 (x86_64).
* Fix for x32 by removing 'q' suffix in x86-64 instructions.
* Fix generalization for IA-64 (regarding AO_or, AO_..._read/write primitives)
* Fix generalized AO_<type>_fetch_and_add() return type.
* Fix test_atomic_include for the case of missing CAS primitive.
* Fix test_malloc - allocate less memory in case of missing mmap.
* Implement the basic atomic primitives for the hexagon CPU.
== [7.2alpha6] 2011-06-14 ==
* Add missing AO_HAVE_ macros.
* Add support of avr32 CPU.
* Better support of various models of ARM.
* Disable AO_compare_double_and_swap_double_full for SunCC x86 as not working.
* Enable ARM Thumb-2 mode.
* Fix AO_test_and_set_full for SunCC (x86).
* Fix bugs in tests.
* Fix clobbers in AO_compare_and_swap_full (x86.h).
* Fix typos in identifiers and comments.
* Improve AO_sync for PowerPC.
* Improve make scripts (configure.ac).
* Make get_mmaped() in atomic_ops_malloc.c more portable.
* Support Intel compiler.
* Support NaCl target.
* Suppress compiler warnings in various places.
* Test more predefined macros (ARM, PowerPC).
* Use assembly code only for MS VC if available (x86_64).
* Use built-in __sync_bool_compare_and_swap if available (x86_64).
* Workaround bugs in LLVM GCC and SunCC regarding XCHG (x86, x86_64).
== [7.2alpha4] 2009-12-02 ==
* Fix typos in comments, identifiers and documentation.
* Implement AO_compare_and_swap_full for SPARC.
* Refine ARM-specific code.
* Refine code and comments for MS VC.
* Regenerate make scripts.
* Share common code for all 32-bit CPUs (MS VC).
* Support DigitalMars and Watcom compilers.
* Support MS VC for ARM (WinCE).
* Support SH CPU.
* Support win32-pthreads.
* Support x86 and x86_64 for SunCC compiler.
== [7.2alpha2] 2009-05-27 ==
* Add MIPS support.
* Add better support for m68k.
* Add "const" to first parameter of load calls.
* Add parentheses around address argument for various macros.
* Add some platform-specific documentation to INSTALL.
* Add untested 64-bit support for PowerPC.
* Fix AO_compare_and_swap_double_acquire.
* Fix AO_int_fetch_and_add_full (x86_64).
* Fix comments.
* Fix s390 include paths.
* Fix use of lwz instruction (PowerPC).
* Refine clobbers (PowerPC).
* Remove outdated info about Windows support in README.
* Replace K&R-style function definition with ANSI C one.
* add AO_compare_double_and_swap_double for ARMv6.
* gcc/powerpc.h: Consider __NO_LWSYNC__.
== [7.1] 2008-02-11 ==
* Add test_and_set, AO_double_compare_and_swap generalizations.
* Conditionally add compare_double_and_swap_double (x86).
* Conditionally add compare_double_and_swap_double (x86).
* Fix AO_compare_double_and_swap_double_full (x86) for PIC mode.
* Fix AO_load_acquire for PowerPC.
* Fix double-width CAS (x86).
* Refine README (add more warnings about data dependencies).
* Refine double_ptr_storage type definition.
* Support ARMv6+ in GCC.
* Support ArmCC compiler.
* Use _InterlockedExchangeAdd for MS VC (x86).
== [7.0] 2007-06-28 ==
* Add 64-bit version of AO_load_acquire for PowerPC.
* Add support of x86 and x86_64 for MS VC.
* Do not assume that "mfence" is always present (x86.h).
* Fix ARM AO_test_and_set_full.
* Include windows.h (MS VC).
* Update README to reflect C++0x effort.
== [1.2] 2006-07-11 ==
* Add prototypes to suppress compiler warnings.
* Add simple VxWorks support.
* Fix InterlockedCompareExchange proto usage.
* Fix typos (ia64).
* Include all_acquire_release_volatile.h and all_atomic_load_store.h (ia64).
* Initial support for 64-bit targets.
* Use "=q" for AO_test_and_set_full (x86).
* Use inline assembler to generate "mfence" and byte sized XCHG.
* Use new intrinsics available in MSVC 2003 and MSVC 2005.
== [1.1] 2005-09-27 ==
* Add and use read_ordered.h.
* Change function naming from "byte" to "char".
* Fix AO_test_and_set for ARM; define AO_CAN_EMUL_CAS.
== [1.0] 2005-03-21 ==
* Fix various bugs.
* Add atomic_ops primitives for different sized data.
* Add compare_double_and_swap_double and compare_and_swap_double.
* Add initial support for atomic_ops for VC++/Windows/X86 and HP/UX.
* Add minimal support for the Sun SPARC compiler.
* Add support for platforms that require out-of-line assembly code.
* Add support of int-wide operations on platforms with int-sized pointers.
* Added libatomic_ops_gpl library with support for lock-free stack and malloc.
* Attempt to support PowerPC.
* Change atomic_ops include file structure.
* Change most platforms to use byte-wide test-and-set locations.
* Install under "atomic_ops" instead of "ao".
* Remove compiler_barrier workaround for gcc 3.4+.
* Renamed various types to end in _t.
* Use autoconf, automake.

View File

@@ -0,0 +1,13 @@
SUBDIRS = src doc
ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pkgconfig/atomic_ops.pc
noinst_DATA = pkgconfig/atomic_ops-uninstalled.pc
dist_pkgdata_DATA = COPYING README.md
EXTRA_DIST = autogen.sh
#distclean-local:

63
external/bdwgc/libatomic_ops/README.md vendored Normal file
View File

@@ -0,0 +1,63 @@
# The atomic_ops library (libatomic_ops)
This is version 7.4.2 of libatomic_ops.
You might find a more recent version
[here](http://www.hboehm.info/gc/), or
[here](https://github.com/ivmai/libatomic_ops).
## Overview
This package provides semi-portable access to hardware-provided
atomic memory update operations on a number architectures. These might
allow you to write code:
* That does more interesting things in signal handlers.
* Makes more effective use of multiprocessors by allowing you to write
clever lock-free code. Note that such code is very difficult to get
right, and will unavoidably be less portable than lock-based code. It
is also not always faster than lock-based code. But it may occasionally
be a large performance win.
* To experiment with new and much better thread programming paradigms, etc.
For details and licensing restrictions see the files in the "doc"
subdirectory.
Please address bug reports to [mailing list](mailto:bdwgc@lists.opendylan.org).
## Installation and Usage
The configuration and build scripts for this package were generated by
Automake/Autoconf. "./configure; make; sudo make install" in this
directory should work. For a more customized build, see the output of
"./configure --help".
Note that much of the content of this library is in the header files.
However, two small libraries are built and installed:
* libatomic_ops.a is a support library, which is not needed on some platforms.
This is intended to be usable, under some mild restrictions, in free or
proprietary code, as are all the header files. See doc/LICENSING.txt.
* libatomic_ops_gpl.a contains some higher level facilities. This code is
currently covered by the GPL. The contents currently correspond to
the headers atomic_ops_stack.h and atomic_ops_malloc.h.
## Platform Specific Notes
Win32/64: src/Makefile.msft contains a very simple Makefile for building
and running tests and building the gpl library. The core atomic_ops
implementation is entirely in header files.
HP-UX/PA-RISC: aCC -Ae won't work as a C compiler, since it doesn't support
inline assembly code. Use cc.
## Copyright & Warranty
See doc/LICENSING.txt file.

13
external/bdwgc/libatomic_ops/TODO vendored Normal file
View File

@@ -0,0 +1,13 @@
== TODO tasks ==
Add C++0x ATM (atomic memory operations) layer.
== FIXME tasks ==
RHELinux6/POWER7 (gcc-4.4.7-3/ppc64), Fedora16/POWER7 (gcc-4.6.2-1/ppc64),
Debian/powerpc (gcc 4.6.3-7):
test_stack failed (Debian Bug #680100).
Debian/m68k (Linux 3.2.0-2-atari):
test_stack failed (Bus error), regression (Debian Bug #680066).

10
external/bdwgc/libatomic_ops/autogen.sh vendored Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
set -e
# This script creates (or regenerates) configure (as well as aclocal.m4,
# config.h.in, Makefile.in, etc.) missing in the source repository.
autoreconf -i
echo
echo "Ready to run './configure'."

View File

@@ -0,0 +1,190 @@
# Process this file with autoconf to produce a configure script.
AC_INIT([libatomic_ops],[7.4.2],bdwgc@lists.opendylan.org)
AC_PREREQ(2.61)
AC_CANONICAL_TARGET([])
AC_CONFIG_SRCDIR(src/atomic_ops.c)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
AM_MAINTAINER_MODE
AC_CONFIG_HEADERS([src/config.h])
# Checks for programs.
AM_PROG_CC_C_O
AM_PROG_AS
LT_INIT([disable-shared])
# Checks for functions.
AC_FUNC_MMAP
# Determine PIC flag.
need_asm=false
PICFLAG=
AC_MSG_CHECKING(for PIC compiler flag)
if test "$GCC" = yes; then
case "$host" in
*-*-cygwin* | *-*-mingw*)
# Cygwin and Mingw[-w32/64] do not need -fPIC.
AC_MSG_RESULT("<none>")
;;
*)
AC_MSG_RESULT(-fPIC)
PICFLAG=-fPIC
AC_MSG_CHECKING(whether gcc -fPIC causes __PIC__ definition)
# Workaround: at least GCC 3.4.6 (Solaris) does not define this macro.
old_CFLAGS="$CFLAGS"
CFLAGS="$PICFLAG $CFLAGS"
AC_TRY_COMPILE([],[
#ifndef __PIC__
# error
#endif
], [ac_cv_pic_macro=yes], [ac_cv_pic_macro=no])
CFLAGS="$old_CFLAGS"
AC_MSG_RESULT($ac_cv_pic_macro)
AS_IF([test "$ac_cv_pic_macro" = yes], [],
[PICFLAG="-D__PIC__=1 $PICFLAG"])
;;
esac
# Output all warnings.
AC_MSG_CHECKING(for gcc -Wextra)
old_CFLAGS="$CFLAGS"
CFLAGS="-Wextra $CFLAGS"
AC_TRY_COMPILE([],[], [ac_cv_cc_wextra=yes], [ac_cv_cc_wextra=no])
CFLAGS="$old_CFLAGS"
AC_MSG_RESULT($ac_cv_cc_wextra)
AS_IF([test "$ac_cv_cc_wextra" = yes], [WEXTRA="-Wextra"], [WEXTRA="-W"])
CFLAGS="-Wall $WEXTRA $CFLAGS"
else
case "$host" in
*-*-hpux*)
AC_MSG_RESULT("+Z")
PICFLAG="+Z"
CFLAGS="+O2 -mt $CFLAGS"
;;
*-*-solaris*)
AC_MSG_RESULT(-Kpic)
PICFLAG=-Kpic
CFLAGS="-O $CFLAGS"
need_asm=true
;;
*-*-linux*)
AC_MSG_RESULT(-fPIC)
PICFLAG=-fPIC
# Any Linux compiler had better be gcc compatible.
;;
*)
AC_MSG_RESULT("<none>")
;;
esac
fi
AC_ARG_ENABLE(assertions,
[AC_HELP_STRING([--enable-assertions], [Assertion checking])])
if test "$enable_assertions" != yes; then
AC_DEFINE([NDEBUG], 1, [Define to disable assertion checking.])
fi
AC_SUBST(PICFLAG)
AC_SUBST(DEFS)
AH_TEMPLATE([_PTHREADS], [Indicates the use of pthreads (NetBSD).])
AH_TEMPLATE([AO_USE_NANOSLEEP],
[Use nanosleep() instead of select() (only if atomic operations \
are emulated)])
AH_TEMPLATE([AO_USE_NO_SIGNALS],
[Do not block signals in compare_and_swap (only if atomic operations \
are emulated)])
AH_TEMPLATE([AO_USE_WIN32_PTHREADS],
[Use Win32 Sleep() instead of select() (only if atomic operations \
are emulated)])
AH_TEMPLATE([AO_TRACE_MALLOC], [Trace AO_malloc/free calls (for debug only)])
# These macros are tested in public headers
AH_TEMPLATE([AO_GENERALIZE_ASM_BOOL_CAS],
[Force compare_and_swap definition via fetch_compare_and_swap])
AH_TEMPLATE([AO_PREFER_GENERALIZED],
[Prefer generalized definitions to direct assembly-based ones])
AH_TEMPLATE([AO_USE_PTHREAD_DEFS],
[Emulate atomic operations via slow and async-signal-unsafe \
pthread locking])
AH_TEMPLATE([AO_ASM_X64_AVAILABLE],
[Inline assembly avalable (only VC/x86_64)])
AH_TEMPLATE([AO_ASSUME_VISTA],
[Assume Windows Server 2003, Vista or later target (only VC/x86)])
AH_TEMPLATE([AO_ASSUME_WINDOWS98],
[Assume hardware compare-and-swap functionality available \
on target (only VC/x86)])
AH_TEMPLATE([AO_CMPXCHG16B_AVAILABLE],
[Assume target is not old AMD Opteron chip (only x86_64)])
AH_TEMPLATE([AO_FORCE_USE_SWP],
[Force test_and_set to use SWP instruction instead of LDREX/STREX \
(only arm v6+)])
AH_TEMPLATE([AO_NO_SPARC_V9], [Assume target is not sparc v9+ (only sparc)])
AH_TEMPLATE([AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE],
[Assume ancient MS VS Win32 headers (only VC/arm v6+, VC/x86)])
AH_TEMPLATE([AO_UNIPROCESSOR], [Assume single-core target (only arm v6+)])
AH_TEMPLATE([AO_USE_INTERLOCKED_INTRINSICS],
[Assume Win32 _Interlocked primitives available as intrinsics \
(only VC/arm)])
AH_TEMPLATE([AO_USE_PENTIUM4_INSTRS],
[Use Pentium 4 'mfence' instruction (only x86)])
AH_TEMPLATE([AO_USE_SYNC_CAS_BUILTIN],
[Prefer GCC built-in CAS intrinsics in favor of inline assembly \
(only gcc/x86, gcc/x86_64)])
AH_TEMPLATE([AO_WEAK_DOUBLE_CAS_EMULATION],
[Emulate double-width CAS via pthread locking in case of no hardware \
support (only gcc/x86_64, the emulation is unsafe)])
AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.])
# Libraries needed to support threads (if any).
have_pthreads=false
AC_CHECK_LIB(pthread, pthread_self, have_pthreads=true)
if test x$have_pthreads = xtrue; then
THREADDLLIBS=-lpthread
case "$host" in
*-*-netbsd*)
# Indicates the use of pthreads.
AC_DEFINE(_PTHREADS)
;;
*-*-openbsd* | *-*-kfreebsd*-gnu | *-*-dgux*)
THREADDLLIBS=-pthread
;;
*-*-cygwin* | *-*-darwin*)
# Cygwin does not have a real libpthread, so Libtool cannot link
# against it.
THREADDLLIBS=
;;
*-*-mingw*)
# Use Win32 threads for tests anyway.
THREADDLLIBS=
# Skip test_atomic_pthreads.
have_pthreads=false
;;
esac
else
AC_DEFINE([AO_NO_PTHREADS], 1, [No pthreads library available])
# Assume VxWorks or Win32.
THREADDLLIBS=
fi
AC_SUBST(THREADDLLIBS)
AM_CONDITIONAL(HAVE_PTHREAD_H, test x$have_pthreads = xtrue)
AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue)
AC_CONFIG_FILES([
Makefile
doc/Makefile
src/Makefile
pkgconfig/atomic_ops.pc
pkgconfig/atomic_ops-uninstalled.pc ])
AC_CONFIG_COMMANDS([default],[[]],[[
PICFLAG="${PICFLAG}"
CC="${CC}"
DEFS="${DEFS}"
]])
AC_OUTPUT

View File

@@ -0,0 +1,63 @@
Our intent is to make it easy to use libatomic_ops, in
both free and proprietary software. Hence most code that we expect to be
linked into a client application is covered by an MIT-style license.
A few library routines are covered by the GNU General Public License.
These are put into a separate library, libatomic_ops_gpl.a .
The low-level part of the library is mostly covered by the following
license:
----------------------------------------
Copyright (c) ...
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--------------------------------
A few files in the sysdeps directory were inherited in part from the
Boehm-Demers-Weiser conservative garbage collector, and are covered by
its license, which is similar in spirit:
--------------------------------
Copyright (c) ...
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
Permission is hereby granted to use or copy this program
for any purpose, provided the above notices are retained on all copies.
Permission to modify the code and to distribute modified code is granted,
provided the above notices are retained, and a notice that the code was
modified is included with the above copyright notice.
----------------------------------
A few files are covered by the GNU General Public License. (See file
"COPYING".) This applies only to test code, sample applications,
and the libatomic_ops_gpl portion of the library.
Thus libatomic_ops_gpl should generally not be linked into proprietary code.
(This distinction was motivated by patent considerations.)
It is possible that the license of the GPL pieces may be changed for
future versions to make them more consistent with the rest of the package.
If you submit patches, and have strong preferences about licensing, please
express them.

View File

@@ -0,0 +1,4 @@
# installed documentation
#
dist_pkgdata_DATA=LICENSING.txt README.txt README_stack.txt \
README_malloc.txt README_win32.txt

View File

@@ -0,0 +1,246 @@
Usage:
0) If possible, do this on a multiprocessor, especially if you are planning
on modifying or enhancing the package. It will work on a uniprocessor,
but the tests are much more likely to pass in the presence of serious problems.
1) Type ./configure --prefix=<install dir>; make; make check
in the directory containing unpacked source. The usual GNU build machinery
is used, except that only static, but position-independent, libraries
are normally built. On Windows, read README_win32.txt instead.
2) Applications should include atomic_ops.h. Nearly all operations
are implemented by header files included from it. It is sometimes
necessary, and always recommended to also link against libatomic_ops.a.
To use the almost non-blocking stack or malloc implementations,
see the corresponding README files, and also link against libatomic_gpl.a
before linking against libatomic_ops.a.
OVERVIEW:
Atomic_ops.h defines a large collection of operations, each one of which is
a combination of an (optional) atomic memory operation, and a memory barrier.
Also defines associated feature-test macros to determine whether a particular
operation is available on the current target hardware (either directly or
by synthesis). This is an attempt to replace various existing files with
similar goals, since they usually do not handle differences in memory
barrier styles with sufficient generality.
If this is included after defining AO_REQUIRE_CAS, then the package
will make an attempt to emulate compare-and-swap in a way that (at least
on Linux) should still be async-signal-safe. As a result, most other
atomic operations will then be defined using the compare-and-swap
emulation. This emulation is slow, since it needs to disable signals.
And it needs to block in case of contention. If you care about performance
on a platform that can't directly provide compare-and-swap, there are
probably better alternatives. But this allows easy ports to some such
platforms (e.g. PA_RISC). The option is ignored if compare-and-swap
can be implemented directly.
If atomic_ops.h is included after defining AO_USE_PTHREAD_DEFS, then all
atomic operations will be emulated with pthread locking. This is NOT
async-signal-safe. And it is slow. It is intended primarily for debugging
of the atomic_ops package itself.
Note that the implementation reflects our understanding of real processor
behavior. This occasionally diverges from the documented behavior. (E.g.
the documented X86 behavior seems to be weak enough that it is impractical
to use. Current real implementations appear to be much better behaved.)
We of course are in no position to guarantee that future processors
(even HPs) will continue to behave this way, though we hope they will.
This is a work in progress. Corrections/additions for other platforms are
greatly appreciated. It passes rudimentary tests on X86, Itanium, and
Alpha.
OPERATIONS:
Most operations operate on values of type AO_t, which are unsigned integers
whose size matches that of pointers on the given architecture. Exceptions
are:
- AO_test_and_set operates on AO_TS_t, which is whatever size the hardware
supports with good performance. In some cases this is the length of a cache
line. In some cases it is a byte. In many cases it is equivalent to AO_t.
- A few operations are implemented on smaller or larger size integers.
Such operations are indicated by the appropriate prefix:
AO_char_... Operates on unsigned char values.
AO_short_... Operates on unsigned short values.
AO_int_... Operates on unsigned int values.
(Currently a very limited selection of these is implemented. We're
working on it.)
The defined operations are all of the form AO_[<size>_]<op><barrier>(<args>).
The <op> component specifies an atomic memory operation. It may be
one of the following, where the corresponding argument and result types
are also specified:
void nop()
No atomic operation. The barrier may still be useful.
AO_t load(const volatile AO_t * addr)
Atomic load of *addr.
void store(volatile AO_t * addr, AO_t new_val)
Atomically store new_val to *addr.
AO_t fetch_and_add(volatile AO_t *addr, AO_t incr)
Atomically add incr to *addr, and return the original value of *addr.
AO_t fetch_and_add1(volatile AO_t *addr)
Equivalent to AO_fetch_and_add(addr, 1).
AO_t fetch_and_sub1(volatile AO_t *addr)
Equivalent to AO_fetch_and_add(addr, (AO_t)(-1)).
void and(volatile AO_t *addr, AO_t value)
Atomically 'and' value into *addr.
void or(volatile AO_t *addr, AO_t value)
Atomically 'or' value into *addr.
void xor(volatile AO_t *addr, AO_t value)
Atomically 'xor' value into *addr.
int compare_and_swap(volatile AO_t * addr, AO_t old_val, AO_t new_val)
Atomically compare *addr to old_val, and replace *addr by new_val
if the first comparison succeeds. Returns nonzero if the comparison
succeeded and *addr was updated.
AO_t fetch_compare_and_swap(volatile AO_t * addr, AO_t old_val, AO_t new_val)
Atomically compare *addr to old_val, and replace *addr by new_val
if the first comparison succeeds; returns the original value of *addr.
AO_TS_VAL_t test_and_set(volatile AO_TS_t * addr)
Atomically read the binary value at *addr, and set it. AO_TS_VAL_t
is an enumeration type which includes two values AO_TS_SET and
AO_TS_CLEAR. An AO_TS_t location is capable of holding an
AO_TS_VAL_t, but may be much larger, as dictated by hardware
constraints. Test_and_set logically sets the value to AO_TS_SET.
It may be reset to AO_TS_CLEAR with the AO_CLEAR(AO_TS_t *) macro.
AO_TS_t locations should be initialized to AO_TS_INITIALIZER.
The values of AO_TS_SET and AO_TS_CLEAR are hardware dependent.
(On PA-RISC, AO_TS_SET is zero!)
Test_and_set is a more limited version of compare_and_swap. Its only
advantage is that it is more easily implementable on some hardware. It
should thus be used if only binary test-and-set functionality is needed.
If available, we also provide compare_and_swap operations that operate
on wider values. Since standard data types for double width values
may not be available, these explicitly take pairs of arguments for the
new and/or old value. Unfortunately, there are two common variants,
neither of which can easily and efficiently emulate the other.
The first performs a comparison against the entire value being replaced,
where the second replaces a double-width replacement, but performs
a single-width comparison:
int compare_double_and_swap_double(volatile AO_double_t * addr,
AO_t old_val1, AO_t old_val2,
AO_t new_val1, AO_t new_val2);
int compare_and_swap_double(volatile AO_double_t * addr,
AO_t old_val1,
AO_t new_val1, AO_t new_val2);
where AO_double_t is a structure containing AO_val1 and AO_val2 fields,
both of type AO_t. For compare_and_swap_double, we compare against
the val1 field. AO_double_t exists only if AO_HAVE_double_t
is defined.
ORDERING CONSTRAINTS:
Each operation name also includes a suffix that specifies the associated
ordering semantics. The ordering constraint limits reordering of this
operation with respect to other atomic operations and ordinary memory
references. The current implementation assumes that all memory references
are to ordinary cacheable memory; the ordering guarantee is with respect
to other threads or processes, not I/O devices. (Whether or not this
distinction is important is platform-dependent.)
Ordering suffixes are one of the following:
<none>: No memory barrier. A plain AO_nop() really does nothing.
_release: Earlier operations must become visible to other threads
before the atomic operation.
_acquire: Later operations must become visible after this operation.
_read: Subsequent reads must become visible after reads included in
the atomic operation or preceding it. Rarely useful for clients?
_write: Earlier writes become visible before writes during or after
the atomic operation. Rarely useful for clients?
_full: Ordered with respect to both earlier and later memory ops.
AO_store_full or AO_nop_full are the normal ways to force a store
to be ordered with respect to a later load.
_release_write: Ordered with respect to earlier writes. This is
normally implemented as either a _write or _release
barrier.
_acquire_read: Ordered with respect to later reads. This is
normally implemented as either a _read or _acquire barrier.
_dd_acquire_read: Ordered with respect to later reads that are data
dependent on this one. This is needed on
a pointer read, which is later dereferenced to read a
second value, with the expectation that the second
read is ordered after the first one. On most architectures,
this is equivalent to no barrier. (This is very
hard to define precisely. It should probably be avoided.
A major problem is that optimizers tend to try to
eliminate dependencies from the generated code, since
dependencies force the hardware to execute the code
serially.)
We assume that if a store is data-dependent on a previous load, then
the two are always implicitly ordered.
It is possible to test whether AO_<op><barrier> is available on the
current platform by checking whether AO_HAVE_<op>_<barrier> is defined
as a macro.
Note that we generally don't implement operations that are either
meaningless (e.g. AO_nop_acquire, AO_nop_release) or which appear to
have no clear use (e.g. AO_load_release, AO_store_acquire, AO_load_write,
AO_store_read). On some platforms (e.g. PA-RISC) many operations
will remain undefined unless AO_REQUIRE_CAS is defined before including
the package.
When typed in the package build directory, the following command
will print operations that are unimplemented on the platform:
make test_atomic; ./test_atomic
The following command generates a file "list_atomic.i" containing the
macro expansions of all implemented operations on the platform:
make list_atomic.i
Future directions:
It currently appears that something roughly analogous to this is very likely
to become part of the C++0x standard. That effort has pointed out a number
of issues that we expect to address there. Since some of the solutions
really require compiler support, they may not be completely addressed here.
Known issues include:
We should be more precise in defining the semantics of the ordering
constraints, and if and how we can guarantee sequential consistency.
Dd_acquire_read is very hard or impossible to define in a way that cannot
be invalidated by reasonably standard compiler transformations.
There is probably no good reason to provide operations on standard
integer types, since those may have the wrong alignment constraints.
Example:
If you want to initialize an object, and then "publish" a pointer to it
in a global location p, such that other threads reading the new value of
p are guaranteed to see an initialized object, it suffices to use
AO_release_write(p, ...) to write the pointer to the object, and to
retrieve it in other threads with AO_acquire_read(p).
Platform notes:
All X86: We quietly assume 486 or better.
Microsoft compilers:
Define AO_ASSUME_WINDOWS98 to get access to hardware compare-and-swap
functionality. This relies on the InterlockedCompareExchange() function
which was apparently not supported in Windows95. (There may be a better
way to get access to this.)
Gcc on x86:
Define AO_USE_PENTIUM4_INSTRS to use the Pentium 4 mfence instruction.
Currently this is appears to be of marginal benefit.

View File

@@ -0,0 +1,57 @@
The libatomic_ops_gpl includes a simple almost-lock-free malloc implementation.
This is intended as a safe way to allocate memory from a signal handler,
or to allocate memory in the context of a library that does not know what
thread library it will be used with. In either case locking is impossible.
Note that the operations are only guaranteed to be 1-lock-free, i.e. a
single blocked thread will not prevent progress, but multiple blocked
threads may. To safely use these operations in a signal handler,
the handler should be non-reentrant, i.e. it should not be interruptable
by another handler using these operations. Furthermore use outside
of signal handlers in a multithreaded application should be protected
by a lock, so that at most one invocation may be interrupted by a signal.
The header will define the macro "AO_MALLOC_IS_LOCK_FREE" on platforms
on which malloc is completely lock-free, and hence these restrictions
do not apply.
In the presence of threads, but absence of contention, the time performance
of this package should be as good, or slightly better than, most system
malloc implementations. Its space performance
is theoretically optimal (to within a constant factor), but probably
quite poor in practice. In particular, no attempt is made to
coalesce free small memory blocks. Something like Doug Lea's malloc is
likely to use significantly less memory for complex applications.
Performance on platforms without an efficient compare-and-swap implementation
will be poor.
This package was not designed for processor-scalability in the face of
high allocation rates. If all threads happen to allocate different-sized
objects, you might get lucky. Otherwise expect contention and false-sharing
problems. If this is an issue, something like Maged Michael's algorithm
(PLDI 2004) would be technically a far better choice. If you are concerned
only with scalability, and not signal-safety, you might also consider
using Hoard instead. We have seen a factor of 3 to 4 slowdown from the
standard glibc malloc implementation with contention, even when the
performance without contention was faster. (To make the implementation
more scalable, one would need to replicate at least the free list headers,
so that concurrent access is possible without cache conflicts.)
Unfortunately there is no portable async-signal-safe way to obtain large
chunks of memory from the OS. Based on reading of the source code,
mmap-based allocation appears safe under Linux, and probably BSD variants.
It is probably unsafe for operating systems built on Mach, such as
Apple's Darwin. Without use of mmap, the allocator is
limited to a fixed size, statically preallocated heap (2MB by default),
and will fail to allocate objects above a certain size (just under 64K
by default). Use of mmap to circumvent these limitations requires an
explicit call.
The entire interface to the AO_malloc package currently consists of:
#include <atomic_ops_malloc.h> /* includes atomic_ops.h */
void *AO_malloc(size_t sz);
void AO_free(void *p);
void AO_malloc_enable_mmap(void);

View File

@@ -0,0 +1,77 @@
Note that the AO_stack implementation is licensed under the GPL,
unlike the lower level routines.
The header file atomic_ops_stack.h defines a linked stack abstraction.
Stacks may be accessed by multiple concurrent threads. The implementation
is 1-lock-free, i.e. it will continue to make progress if at most one
thread becomes inactive while operating on the data structure.
(The implementation can be built to be N-lock-free for any given N. But that
seems to rarely be useful, especially since larger N involve some slowdown.)
This makes it safe to access these data structures from non-reentrant
signal handlers, provided at most one non-signal-handler thread is
accessing the data structure at once. This latter condition can be
ensured by acquiring an ordinary lock around the non-handler accesses
to the data structure.
For details see:
Hans-J. Boehm, "An Almost Non-Blocking Stack", PODC 2004,
http://portal.acm.org/citation.cfm?doid=1011767.1011774
(This is not exactly the implementation described there, since the
interface was cleaned up in the interim. But it should perform
very similarly.)
We use a fully lock-free implementation when the underlying hardware
makes that less expensive, i.e. when we have a double-wide compare-and-swap
operation available. (The fully lock-free implementation uses an AO_t-
sized version count, and assumes it does not wrap during the time any
given operation is active. This seems reasonably safe on 32-bit hardware,
and very safe on 64-bit hardware.) If a fully lock-free implementation
is used, the macro AO_STACK_IS_LOCK_FREE will be defined.
The implementation is interesting only because it allows reuse of
existing nodes. This is necessary, for example, to implement a memory
allocator.
Since we want to leave the precise stack node type up to the client,
we insist only that each stack node contains a link field of type AO_t.
When a new node is pushed on the stack, the push operation expects to be
passed the pointer to this link field, which will then be overwritten by
this link field. Similarly, the pop operation returns a pointer to the
link field of the object that previously was on the top of the stack.
The cleanest way to use these routines is probably to define the stack node
type with an initial AO_t link field, so that the conversion between the
link-field pointer and the stack element pointer is just a compile-time
cast. But other possibilities exist. (This would be cleaner in C++ with
templates.)
A stack is represented by an AO_stack_t structure. (This is normally
2 or 3 times the size of a pointer.) It may be statically initialized
by setting it to AO_STACK_INITIALIZER, or dynamically initialized to
an empty stack with AO_stack_init. There are only three operations for
accessing stacks:
void AO_stack_init(AO_stack_t *list);
void AO_stack_push_release(AO_stack_t *list, AO_t *new_element);
AO_t * AO_stack_pop_acquire(volatile AO_stack_t *list);
We require that the objects pushed as list elements remain addressable
as long as any push or pop operation are in progress. (It is OK for an object
to be "pop"ped off a stack and "deallocated" with a concurrent "pop" on
the same stack still in progress, but only if "deallocation" leaves the
object addressable. The second "pop" may still read the object, but
the value it reads will not matter.)
We require that the headers (AO_stack objects) remain allocated and
valid as long as any operations on them are still in-flight.
We also provide macros AO_REAL_HEAD_PTR that converts an AO_stack_t
to a pointer to the link field in the next element, and AO_REAL_NEXT_PTR
that converts a link field to a real, dereferencable, pointer to the link field
in the next element. This is intended only for debugging, or to traverse
the list after modification has ceased. There is otherwise no guarantee that
walking a stack using this macro will produce any kind of consistent
picture of the data structure.

View File

@@ -0,0 +1,31 @@
Most of the atomic_ops functionality is available under Win32 with
the Microsoft tools, but the build process currently is considerably more
primitive than on Linux/Unix platforms.
To build:
1) Go to the src directory in the distribution.
2) Make sure the Microsoft command-line tools (e.g. nmake) are available.
3) Run "nmake -f Makefile.msft". This should run some tests, which
may print warnings about the types of the "Interlocked" functions.
I haven't been able to make all versions of VC++ happy. If you know
how to, please send a patch.
4) To compile applications, you will need to retain or copy the following
pieces from the resulting src directory contents:
"atomic_ops.h" - Header file defining low-level primitives. This
includes files from:
"atomic_ops"- Subdirectory containing implementation header files.
"atomic_ops_stack.h" - Header file describing almost lock-free stack.
"atomic_ops_malloc.h" - Header file describing almost lock-free malloc.
"libatomic_ops_gpl.lib" - Library containing implementation of the
above two (plus AO_pause() defined in atomic_ops.c).
The atomic_ops.h implementation is entirely in the
header files in Win32.
Most clients of atomic_ops.h will need to define AO_ASSUME_WINDOWS98 before
including it. Compare_and_swap is otherwise not available.
Defining AO_ASSUME_VISTA will make compare_double_and_swap_double available
as well.
Note that the library is covered by the GNU General Public License, while
the top 2 of these pieces allow use in proprietary code.

View File

@@ -0,0 +1,3 @@
# Place holder to keep this directory in the Git repository.
*
!.gitignore

View File

@@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
top_builddir=@abs_top_builddir@
top_srcdir=@abs_top_srcdir@
Name: The atomic_ops library (uninstalled)
Description: Atomic memory update operations
Version: @PACKAGE_VERSION@
Libs: ${top_builddir}/src/libatomic_ops.la
Cflags: -I${top_builddir}/src -I${top_srcdir}/src

View File

@@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: The atomic_ops library
Description: Atomic memory update operations portable implementation
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -latomic_ops
Cflags: -I${includedir}

View File

@@ -0,0 +1,229 @@
AM_CFLAGS=@PICFLAG@
AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src
include_HEADERS = atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
lib_LTLIBRARIES = libatomic_ops.la libatomic_ops_gpl.la
if NEED_ASM
libatomic_ops_la_SOURCES = atomic_ops.c atomic_ops_sysdeps.S
else
libatomic_ops_la_SOURCES = atomic_ops.c
endif
libatomic_ops_la_LDFLAGS = -version-info 1:3:0 -no-undefined
libatomic_ops_gpl_la_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c
libatomic_ops_gpl_la_LDFLAGS = -version-info 1:3:0 -no-undefined
EXTRA_DIST = Makefile.msft atomic_ops/sysdeps/README \
atomic_ops/generalize-arithm.template \
atomic_ops/generalize-small.template \
atomic_ops/sysdeps/ao_t_is_int.template \
atomic_ops/sysdeps/gcc/generic-arithm.template \
atomic_ops/sysdeps/gcc/generic-small.template \
atomic_ops/sysdeps/loadstore/acquire_release_volatile.template \
atomic_ops/sysdeps/loadstore/atomic_load.template \
atomic_ops/sysdeps/loadstore/atomic_store.template \
atomic_ops/sysdeps/loadstore/ordered_loads_only.template \
atomic_ops/sysdeps/loadstore/ordered_stores_only.template \
atomic_ops/sysdeps/sunc/sparc.S
BUILT_SOURCES = atomic_ops/generalize-arithm.h \
atomic_ops/generalize-small.h \
atomic_ops/sysdeps/ao_t_is_int.h \
atomic_ops/sysdeps/gcc/generic-arithm.h \
atomic_ops/sysdeps/gcc/generic-small.h \
atomic_ops/sysdeps/loadstore/acquire_release_volatile.h \
atomic_ops/sysdeps/loadstore/atomic_load.h \
atomic_ops/sysdeps/loadstore/atomic_store.h \
atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h \
atomic_ops/sysdeps/loadstore/char_atomic_load.h \
atomic_ops/sysdeps/loadstore/char_atomic_store.h \
atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h \
atomic_ops/sysdeps/loadstore/int_atomic_load.h \
atomic_ops/sysdeps/loadstore/int_atomic_store.h \
atomic_ops/sysdeps/loadstore/ordered_loads_only.h \
atomic_ops/sysdeps/loadstore/ordered_stores_only.h \
atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h \
atomic_ops/sysdeps/loadstore/short_atomic_load.h \
atomic_ops/sysdeps/loadstore/short_atomic_store.h
#Private Headers
privatedir=${includedir}/
nobase_private_HEADERS = atomic_ops/ao_version.h \
atomic_ops/generalize.h \
$(BUILT_SOURCES) \
\
atomic_ops/sysdeps/all_acquire_release_volatile.h \
atomic_ops/sysdeps/all_aligned_atomic_load_store.h \
atomic_ops/sysdeps/all_atomic_load_store.h \
atomic_ops/sysdeps/all_atomic_only_load.h \
atomic_ops/sysdeps/emul_cas.h \
atomic_ops/sysdeps/generic_pthread.h \
atomic_ops/sysdeps/ordered.h \
atomic_ops/sysdeps/ordered_except_wr.h \
atomic_ops/sysdeps/read_ordered.h \
atomic_ops/sysdeps/standard_ao_double_t.h \
atomic_ops/sysdeps/test_and_set_t_is_ao_t.h \
atomic_ops/sysdeps/test_and_set_t_is_char.h \
\
atomic_ops/sysdeps/armcc/arm_v6.h \
\
atomic_ops/sysdeps/gcc/aarch64.h \
atomic_ops/sysdeps/gcc/alpha.h \
atomic_ops/sysdeps/gcc/arm.h \
atomic_ops/sysdeps/gcc/avr32.h \
atomic_ops/sysdeps/gcc/cris.h \
atomic_ops/sysdeps/gcc/generic.h \
atomic_ops/sysdeps/gcc/hexagon.h \
atomic_ops/sysdeps/gcc/hppa.h \
atomic_ops/sysdeps/gcc/ia64.h \
atomic_ops/sysdeps/gcc/m68k.h \
atomic_ops/sysdeps/gcc/mips.h \
atomic_ops/sysdeps/gcc/powerpc.h \
atomic_ops/sysdeps/gcc/s390.h \
atomic_ops/sysdeps/gcc/sh.h \
atomic_ops/sysdeps/gcc/sparc.h \
atomic_ops/sysdeps/gcc/x86.h \
\
atomic_ops/sysdeps/hpc/hppa.h \
atomic_ops/sysdeps/hpc/ia64.h \
\
atomic_ops/sysdeps/ibmc/powerpc.h \
\
atomic_ops/sysdeps/icc/ia64.h \
\
atomic_ops/sysdeps/loadstore/double_atomic_load_store.h \
\
atomic_ops/sysdeps/msftc/arm.h \
atomic_ops/sysdeps/msftc/common32_defs.h \
atomic_ops/sysdeps/msftc/x86.h \
atomic_ops/sysdeps/msftc/x86_64.h \
\
atomic_ops/sysdeps/sunc/sparc.h \
atomic_ops/sysdeps/sunc/x86.h
atomic_ops/generalize-small.h: atomic_ops/generalize-small.template
sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@
atomic_ops/generalize-arithm.h: atomic_ops/generalize-arithm.template
sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
atomic_ops/sysdeps/ao_t_is_int.h: atomic_ops/sysdeps/ao_t_is_int.template
sed -e s:_XBAR::g $? > $@
sed -e s:XBAR:full:g $? >> $@
sed -e s:XBAR:acquire:g $? >> $@
sed -e s:XBAR:release:g $? >> $@
sed -e s:XBAR:write:g $? >> $@
sed -e s:XBAR:read:g $? >> $@
atomic_ops/sysdeps/gcc/generic-arithm.h: \
atomic_ops/sysdeps/gcc/generic-arithm.template
sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \
-e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \
-e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \
-e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \
-e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \
-e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@
sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \
-e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \
-e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \
-e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \
-e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@
sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \
-e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \
-e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \
-e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \
-e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@
sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \
-e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \
-e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \
-e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
atomic_ops/sysdeps/gcc/generic-small.h: \
atomic_ops/sysdeps/gcc/generic-small.template
sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
atomic_ops/sysdeps/loadstore/ordered_loads_only.h: \
atomic_ops/sysdeps/loadstore/ordered_loads_only.template
sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@
atomic_ops/sysdeps/loadstore/ordered_stores_only.h: \
atomic_ops/sysdeps/loadstore/ordered_stores_only.template
sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@
atomic_ops/sysdeps/loadstore/acquire_release_volatile.h: \
atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@
atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h: \
atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h: \
atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@
atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h: \
atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@
atomic_ops/sysdeps/loadstore/atomic_load.h: \
atomic_ops/sysdeps/loadstore/atomic_load.template
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@
atomic_ops/sysdeps/loadstore/char_atomic_load.h: \
atomic_ops/sysdeps/loadstore/atomic_load.template
sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
atomic_ops/sysdeps/loadstore/int_atomic_load.h: \
atomic_ops/sysdeps/loadstore/atomic_load.template
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@
atomic_ops/sysdeps/loadstore/short_atomic_load.h: \
atomic_ops/sysdeps/loadstore/atomic_load.template
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@
atomic_ops/sysdeps/loadstore/atomic_store.h: \
atomic_ops/sysdeps/loadstore/atomic_store.template
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@
atomic_ops/sysdeps/loadstore/char_atomic_store.h: \
atomic_ops/sysdeps/loadstore/atomic_store.template
sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
atomic_ops/sysdeps/loadstore/int_atomic_store.h: \
atomic_ops/sysdeps/loadstore/atomic_store.template
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@
atomic_ops/sysdeps/loadstore/short_atomic_store.h: \
atomic_ops/sysdeps/loadstore/atomic_store.template
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@

Some files were not shown because too many files have changed in this diff Show More