mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
Compare commits
55
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5fb27af2b | ||
|
|
75790c6bfd | ||
|
|
fae67254f9 | ||
|
|
c64c9899b2 | ||
|
|
07f9c9a4c3 | ||
|
|
0ff098e198 | ||
|
|
9280eeeb9c | ||
|
|
cdd751aa9b | ||
|
|
24b9875a47 | ||
|
|
42648701b3 | ||
|
|
171809828d | ||
|
|
c815ca7d19 | ||
|
|
4d255adcb2 | ||
|
|
d624a47a68 | ||
|
|
85764ddc74 | ||
|
|
e46e28079e | ||
|
|
d1f6e04e81 | ||
|
|
5598ee402a | ||
|
|
229c941a73 | ||
|
|
d5ef05fd4b | ||
|
|
f6de4c67d9 | ||
|
|
019aff858d | ||
|
|
ab23ee1584 | ||
|
|
90896d3021 | ||
|
|
c9228135a7 | ||
|
|
08ebd4f51c | ||
|
|
199b47b201 | ||
|
|
0cb7daa3b3 | ||
|
|
cbe4d07f35 | ||
|
|
442bd78945 | ||
|
|
4b772bd8a9 | ||
|
|
97f8625d10 | ||
|
|
6117e7c88a | ||
|
|
5af44bea68 | ||
|
|
b3f1896578 | ||
|
|
d6de82f936 | ||
|
|
a0a5d6712c | ||
|
|
962d6a7045 | ||
|
|
926c733cfc | ||
|
|
9fb62d3e4a | ||
|
|
8a9308f385 | ||
|
|
e9750b6f7e | ||
|
|
e2474ba72b | ||
|
|
e097b8cbbf | ||
|
|
9e4af11a75 | ||
|
|
cfd654b338 | ||
|
|
6706852461 | ||
|
|
9d9961ad92 | ||
|
|
1db9a3a7c2 | ||
|
|
6f3a534e4a | ||
|
|
9db3450257 | ||
|
|
f79948e57e | ||
|
|
38ba17f8fb | ||
|
|
467094bf19 | ||
|
|
045f78538a |
No files matched your search
@@ -1,390 +1,3 @@
|
||||
2006-03-22 Chris Toshok <[email protected]>
|
||||
|
||||
* data/net_2_0/web.config: add RoleManagerModule to httpModules.
|
||||
|
||||
* data/net_2_0/machine.config: add system.web/roleManager section
|
||||
handler.
|
||||
|
||||
2006-03-20 Zoltan Varga <[email protected]>
|
||||
|
||||
* libmono.vcproj: Add some newly added source files.
|
||||
|
||||
2006-03-17 Zoltan Varga <[email protected]>
|
||||
|
||||
* libmono.vcproj: Remove os/win32/util.h.
|
||||
|
||||
2006-03-09 Vladimir Krasnov <[email protected]>
|
||||
|
||||
* Added data/net_1_1/DefaultWsdlHelpGenerator.jvm.aspx
|
||||
with removed proxy class generation for Grasshopper
|
||||
|
||||
2006-03-08 Chris Toshok <[email protected]>
|
||||
|
||||
* data/net_2_0/web.config: add a default siteMap section with the
|
||||
AspNetXmlSiteMapProvider provider.
|
||||
|
||||
* data/net_2_0/machine.config: add system.web/siteMap section
|
||||
info.
|
||||
|
||||
2006-03-03 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in mono/os: Merge the contents of libmonoos to metadata/assembly.c and
|
||||
get rid of os/unix and os/win32.
|
||||
|
||||
Wed Mar 1 12:37:43 CET 2006 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: added checks for visibility attribute,
|
||||
option to disable generics, disabled options string define.
|
||||
|
||||
2006-02-27 Raja R Harinath <[email protected]>
|
||||
|
||||
* configure.in (runtime/etc/mono/{1.0,2.0}/machine.config):
|
||||
Fix m4-quoting.
|
||||
|
||||
Sat Feb 25 11:53:30 CET 2006 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: more feature for --enable-minimal flags.
|
||||
|
||||
2006-02-24 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: define PLATFORM_BSD.
|
||||
|
||||
2006-02-17 Zoltan Varga <[email protected]>
|
||||
|
||||
* Makefile.am: Avoid installing mint.pc if mint is not compiled.
|
||||
|
||||
2006-02-07 Chris Toshok <[email protected]>
|
||||
|
||||
* data/net_2_0/Makefile.am (EXTRA_DIST): add web.config
|
||||
(mono_DATA): same.
|
||||
|
||||
* data/net_2_0/machine.config: remove the system.web section from
|
||||
here.
|
||||
|
||||
* data/net_2_0/web.config: and add it here.
|
||||
|
||||
2006-02-02 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: Add FtpRequestCreator
|
||||
to create new instances of System.Net.FtpWebWebRequest.
|
||||
|
||||
2006-02-01 Sebastien Pouliot <[email protected]>
|
||||
|
||||
* libmono.vcproj: Added new files to the VS.NET build.
|
||||
* README.vsnet: Updated VS.NET build instructions.
|
||||
|
||||
2006-01-26 Chris Toshok <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: ignore runtime and startup
|
||||
sections.
|
||||
|
||||
2006-01-25 Chris Toshok <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: ignore mscorlib,
|
||||
system.runtime.remoting, and strongNames sections.
|
||||
|
||||
2006-01-25 Chris Toshok <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: for system.web, add default
|
||||
<authorization> section that allows everything. also, add
|
||||
System.Configuration to system.web/compilation/assemblies.
|
||||
|
||||
2006-01-23 Chris Toshok <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: add System.Configuration to the
|
||||
list of assemblies in system.web/compilation.
|
||||
|
||||
2006-01-23 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in: Added configure check whether the Mono Debugger is
|
||||
supported on this platform; AC_DEFINE(MONO_DEBUGGER_SUPPORTED) and
|
||||
also added a `MONO_DEBUGGER_SUPPORTED' automake conditional.
|
||||
|
||||
2006-01-13 Raja R Harinath <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: Fix a couple of typos in type names.
|
||||
|
||||
2006-01-10 Raja R Harinath <[email protected]>
|
||||
|
||||
* scripts/Makefile.am (scripts_2_0): Add nunit-console2.
|
||||
|
||||
2006-01-09 Chris Toshok <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: switch over to the 2.0
|
||||
configuration sections for System.Web and System.Web.Services.
|
||||
Also, add the configProtectedData stuff so we can encrypt config
|
||||
sections.
|
||||
|
||||
2006-01-08 Robert Jordan <[email protected]>
|
||||
|
||||
* man/mkbundle.1: Documented environment variables and Windows issues.
|
||||
|
||||
2006-01-06 Jonathan Pryor <[email protected]>
|
||||
|
||||
* data/config.in: s/libintl/intl/g. Mono.Unix.Catalog DllImports "intl"
|
||||
now, as intl.dll is the file actually shipped/available on Windows.
|
||||
|
||||
2006-01-04 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Add a CFLAGS_FOR_BUILD autoconf variable.
|
||||
|
||||
2006-01-03 Jonathan Pryor <[email protected]>
|
||||
|
||||
* configure.in: Add check for lutimes(2). Mac OS X doesn't provide this.
|
||||
|
||||
2005-12-28 Kornél Pál <[email protected]>
|
||||
|
||||
* runtime/Makefile.am (all-local): Enclose CC by apostrophes to fix
|
||||
build when CC contains spaces.
|
||||
|
||||
2005-12-27 Jonathan Pryor <[email protected]>
|
||||
|
||||
* configure.in: Add check for <sys/mman.h>. Fixes #77091.
|
||||
Thanks to Ben Gamari for the patch.
|
||||
|
||||
2005-12-26 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Add support for solaris/x86.
|
||||
|
||||
* runtime/Makefile.am (all-local): Pass CC to the mcs makefile.
|
||||
|
||||
2005-12-21 Wade Berrier <[email protected]>
|
||||
|
||||
* mono-cairo.pc.in: use $prefix/lib instead of $libdir,
|
||||
otherwise the cairo.dll can't be found on 64 bit architectures
|
||||
|
||||
2005-12-18 Raja R Harinath <[email protected]>
|
||||
|
||||
* configure.in (config.make): Don't blindly copy over $INSTALL,
|
||||
since it can be relative to the mono tree. Use the same trick as
|
||||
ac_INSTALL, but against an absolute path.
|
||||
|
||||
2005-12-16 Wade Berrier <[email protected]>
|
||||
|
||||
* configure.in: Unset AC_DISABLE_FAST_INSTALL
|
||||
This caused some weird monodis linking errors
|
||||
|
||||
2005-12-12 Mike Kestner <[email protected]>
|
||||
|
||||
* mono-cairo.pc.in: pkgconfig support for Mono.Cairo. Mono.Cairo.dll
|
||||
and this file can be extracted post-build to be packaged separately
|
||||
on win32.
|
||||
* configure.in: expand mono-cairo.pc
|
||||
* Makefile.am: dist and install mono-cairo.pc
|
||||
|
||||
2005-12-01 Jonathan Pryor <[email protected]>
|
||||
|
||||
* configure.in: Check for setkey(3) in -lcrypt and define CRYPT_LIBS
|
||||
accordingly.
|
||||
|
||||
2005-12-01 Mike Kestner <[email protected]>
|
||||
|
||||
* scripts/mono-find-provides.in: support policy assemblies.
|
||||
|
||||
2005-11-29 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: define PLATFORM_MACOSX.
|
||||
|
||||
2005-11-24 Dick Porter <[email protected]>
|
||||
|
||||
* configure.in: Test for GetProcessId() on windows
|
||||
|
||||
2005-11-21 Raja R Harinath <[email protected]>
|
||||
|
||||
* scripts/Makefile.am (bin_SCRIPTS): Move 'gmcs' to ...
|
||||
(scripts_2_0): ... here.
|
||||
(gmcs): Remove special-case rule.
|
||||
|
||||
2005-11-09 Michael Hutchinson <[email protected]>
|
||||
|
||||
* data/net_1_1/machine.config, data/net_2_0/machine.config: Set
|
||||
default values for http proxy
|
||||
|
||||
2005-11-07 Zoltan Varga <[email protected]>
|
||||
|
||||
* docs/jit-regalloc: Merge forgotten documentation updates from
|
||||
the mini-xp-local-regalloc branch.
|
||||
|
||||
2005-10-28 Wade Berrier <[email protected]>
|
||||
|
||||
* mono.pc.in, mint.pc.in, configure.in: Make these relocatable.
|
||||
* scripts: Makefile.am mono-nunit.pc.in script.in mono-service.in
|
||||
Make all the wrappers relocatable.
|
||||
|
||||
2005-10-21 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Add test for execinfo.h.
|
||||
|
||||
2005-10-20 Raja R Harinath <[email protected]>
|
||||
|
||||
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New. Make 'distcheck'
|
||||
compile with the 'monolite' in the distribution tarball.
|
||||
(compiler-tests-net_2_0): Avoid deleting
|
||||
$(mcs_topdir)/build/common/Consts.cs.
|
||||
|
||||
2005-10-20 Robert Jordan <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: Added IPC channel templates.
|
||||
|
||||
2005-10-11 John Luke <[email protected]>
|
||||
|
||||
* man/monop.1: update for new monop options
|
||||
|
||||
2005-10-04 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Fix up problems with the latest libtool on win32.
|
||||
|
||||
2005-10-04 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Remove 'Globalization:' entry from final message.
|
||||
|
||||
2005-09-27 Raja R Harinath <[email protected]>
|
||||
|
||||
* configure.in (BUILD_MCS): New automake conditional. Used to
|
||||
disable building the mcs/ tree if cross-compiling.
|
||||
(CROSS_COMPILING): New automake conditional.
|
||||
($mcsdir/build/config.make): Don't clobber when cross-compiling.
|
||||
(GLIB_CFLAGS, GLIB_LIBS, GMODULE_CFLAGS, GMODULE_LIBS):
|
||||
Define even when cross-compiling.
|
||||
* runtime/Makefile.am (all-local, install, uninstall, clean-local):
|
||||
Disable building in the mcs/ tree if !BUILD_MCS.
|
||||
|
||||
2005-09-22 Raja R Harinath <[email protected]>
|
||||
|
||||
* configure.in (MONO_VERSION): Emit it into config.make. Don't
|
||||
build Consts.cs.
|
||||
|
||||
2005-09-19 Zoltan Varga <[email protected]>
|
||||
|
||||
* docs/exception-handling.txt: Add section about libunwind.
|
||||
|
||||
* docs/exception-handling.txt: New file.
|
||||
|
||||
2005-09-16 Raja R Harinath <[email protected]>
|
||||
|
||||
* runtime/Makefile.am (all-local, install-exec, uninstall)
|
||||
(mcs-do-test-profiles, mcs-do-run-test-profiles, mcs-compileall):
|
||||
Don't call semdel-wrapper.
|
||||
|
||||
2005-09-06 Chris Toshok <[email protected]>
|
||||
|
||||
* data/browscap.ini: Add the ecmascriptversion/w3cdomversion
|
||||
attributes required for ASP.Net client side validation to the
|
||||
capabilities for Mozilla 1.[78], IE 5.5 & 6.0, Safari, and Firefox
|
||||
0.9 & 1.0 browsers.
|
||||
|
||||
2005-08-26 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Add ability to cross-compile from linux to win32.
|
||||
|
||||
2005-08-26 Kornél Pál <[email protected]>
|
||||
|
||||
* configure.in: Generating Consts.cs from Consts.cs.in instead of MonoVersion.cs.
|
||||
|
||||
2005-08-25 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Use CC instead of gcc for __thread tests.
|
||||
|
||||
2005-08-25 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Pass --enable-win32-dllmain to libgc configure. Build the runtime as a dll under windows.
|
||||
|
||||
2005-08-24 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Add -lunwind to ldflags on IA64.
|
||||
|
||||
2005-08-22 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Patch libtool to get rid of 'cyg' prefixes in library names.
|
||||
|
||||
2005-08-11 Zoltan Varga <[email protected]>
|
||||
|
||||
* libmono.vcproj: Fix VC build.
|
||||
|
||||
Thu Aug 4 19:55:33 BST 2005 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: enable the ARM jit port.
|
||||
|
||||
2005-08-02 Zoltan Varga <[email protected]>
|
||||
|
||||
* acconfig.h configure.in: Applied patch from Julien Puydt ([email protected]). Add check for IPV6_PKTINFO.
|
||||
|
||||
2005-07-19 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Fix definition of LIBC for ia64.
|
||||
|
||||
2005-07-12 Daniel Drake <[email protected]>
|
||||
|
||||
* configure.in: Add check for libattr's <attr/attr.h>
|
||||
|
||||
2005-07-11 Raja R Harinath <[email protected]>
|
||||
|
||||
* scripts/script.in: Add @framework_version@ blank.
|
||||
* scripts/script2.in: Remove.
|
||||
* scripts/Makefile.am: Update. Use wsdl.exe for wsdl2 and
|
||||
monop.exe for monop2.
|
||||
|
||||
2005-07-04 Raja R Harinath <[email protected]>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Distribute mono-uninstalled.pc.in.
|
||||
(noinst_DATA): Build mono-uninstalled.pc.
|
||||
* mono-uninstalled.pc.in (Libs): Avoid ${pc_top_builddir}.
|
||||
(Cflags): Likewise. Let $(srcdir) to be absolute.
|
||||
|
||||
2005-07-03 Ben Maurer <[email protected]>
|
||||
|
||||
* scripts/Makefile.am (bin2_SCRIPTS): Add monop2
|
||||
|
||||
2005-07-01 Daniel Drake <[email protected]>
|
||||
|
||||
* configure.in: Add check for FreeBSD's sys/extattr.h
|
||||
|
||||
2005-07-01 Raja R Harinath <[email protected]>
|
||||
|
||||
Avoid resource leakage on 'make clean' (see #75424).
|
||||
* configure.in (AC_CONFIG_FILES): Add runtime/semdel-wrapper.
|
||||
* runtime/semdel-wrapper.in: New.
|
||||
* runtime/Makefile.am (clean-local): Use the semdel program before
|
||||
nuking the .wapi directory.
|
||||
(noinst_SCRIPTS): Add semdel-wrapper.
|
||||
(MYDISTFILES, distdir): Use automake variable to get the list of
|
||||
files to distribute.
|
||||
(all-local, install-exec, uninstall): Call semdel-wrapper.
|
||||
(mcs-do-test-profiles, mcs-do-run-test-profiles, mcs-compileall):
|
||||
Likewise.
|
||||
|
||||
2005-06-27 Geoff Norton <[email protected]>
|
||||
|
||||
* configure.in: Add support for X86 darwin.
|
||||
|
||||
2005-06-22 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Add support for ia64.
|
||||
|
||||
2005-06-20 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: enabled the use of mmap/munmap for solaris and linux.
|
||||
It seems to help with memory usage.
|
||||
|
||||
2005-06-15 Ben Maurer <[email protected]>
|
||||
|
||||
* configure.in: Another attempt at the portable "find libX11.so"
|
||||
Hopefully, this one has no code paths where we are worse off than
|
||||
what we had before any of this mess.
|
||||
|
||||
* configure.in: What I hope is a more portable version hack.
|
||||
|
||||
2005-06-14 Ben Maurer <[email protected]>
|
||||
|
||||
* configure.in: echo the version number to
|
||||
mcs/build/common/MonoVersion.cs. This allows us to not need to
|
||||
update AssemblyInfo.cs every time we bump the version number.
|
||||
|
||||
* mono-uninstalled.pc.in: pc file that handles mono when it is not
|
||||
installed. This lets us have mkbundle work inside the tree.
|
||||
|
||||
* configure.in: Create the .pc file above.
|
||||
|
||||
2005-06-13 Jonathan Pryor <[email protected]>
|
||||
|
||||
* man/mono-shlib-cop.1: Add man page for mono-shlib-cop program.
|
||||
@@ -1026,7 +639,7 @@ Fri Nov 12 17:56:26 CET 2004 Paolo Molaro <[email protected]>
|
||||
|
||||
* runtime/net_2_0/Makefile.am (install-data-local):
|
||||
* runtime/net_1_1/Makefile.am (install-data-local): Applied patch
|
||||
from Götz Waschk ([email protected]). Make this work
|
||||
from Götz Waschk ([email protected]). Make this work
|
||||
with DESTDIR.
|
||||
|
||||
2004-10-31 Zoltan Varga <[email protected]>
|
||||
|
||||
+4
-16
@@ -7,11 +7,7 @@ SUBDIRS = $(libgc_dir) mono $(ikvm_native_dir) support docs data runtime scripts
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = libgc mono ikvm-native support docs data runtime scripts man samples web tools
|
||||
|
||||
vs_files = genmdesc.vcproj libmono.vcproj mono.vcproj mono.sln
|
||||
|
||||
EXTRA_DIST= mono.pc.in mint.pc.in mono-uninstalled.pc.in dotnet.pc.in mono-cairo.pc.in $(vs_files)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
|
||||
EXTRA_DIST= mono.pc.in mint.pc.in
|
||||
|
||||
# Distribute the 'mcs' tree too
|
||||
dist-hook:
|
||||
@@ -20,16 +16,11 @@ dist-hook:
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
if JIT_SUPPORTED
|
||||
if INTERP_SUPPORTED
|
||||
pkgconfig_DATA= mono.pc mint.pc dotnet.pc mono-cairo.pc
|
||||
pkgconfig_DATA= mono.pc mint.pc
|
||||
else
|
||||
pkgconfig_DATA= mono.pc dotnet.pc mono-cairo.pc
|
||||
pkgconfig_DATA= mint.pc
|
||||
endif
|
||||
else
|
||||
pkgconfig_DATA= mint.pc mono-cairo.pc
|
||||
endif
|
||||
noinst_DATA = mono-uninstalled.pc
|
||||
DISTCLEANFILES= mono.pc mint.pc mono-uninstalled.pc dotnet.pc mono-cairo.pc
|
||||
DISTCLEANFILES= mono.pc mint.pc
|
||||
|
||||
.PHONY: get-monolite-latest mcs-do-compiler-tests compiler-tests bootstrap-world
|
||||
|
||||
@@ -48,11 +39,8 @@ compiler-tests: mcs-do-clean
|
||||
$(MAKE) mcs-do-compiler-tests
|
||||
|
||||
compiler-tests-net_2_0:
|
||||
-rm -f $(mcs_topdir)/build/common/Consts.cs.save
|
||||
-mv -f $(mcs_topdir)/build/common/Consts.cs $(mcs_topdir)/build/common/Consts.cs.save
|
||||
cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0_bootstrap clean
|
||||
cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0 clean
|
||||
-mv -f $(mcs_topdir)/build/common/Consts.cs.save $(mcs_topdir)/build/common/Consts.cs
|
||||
$(MAKE) all
|
||||
$(MAKE) build_profiles=net_2_0 mcs-do-compiler-tests
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
This is Mono.
|
||||
|
||||
1. Installation
|
||||
2. Using Mono
|
||||
3. Directory Roadmap
|
||||
1. Installation
|
||||
2. Using Mono
|
||||
3. Directory Roadmap
|
||||
|
||||
1. Compilation and Installation
|
||||
===============================
|
||||
@@ -21,15 +21,6 @@ This is Mono.
|
||||
|
||||
Available from: http://www.gtk.org/
|
||||
|
||||
On Itanium, you must obtain libunwind:
|
||||
|
||||
http://www.hpl.hp.com/research/linux/libunwind/download.php4
|
||||
|
||||
On Solaris, make sure that you used GNU tar to unpack this package, as
|
||||
Solaris tar will not unpack this correctly, and you will get strange errors.
|
||||
|
||||
On Solaris, make sure that you use the GNU toolchain to build the software.
|
||||
|
||||
Optional dependencies:
|
||||
|
||||
* libgdiplus
|
||||
@@ -47,8 +38,7 @@ This is Mono.
|
||||
make
|
||||
make install
|
||||
|
||||
Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390, AMD64, ARM
|
||||
and PowerPC systems.
|
||||
Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390, AMD64 and PowerPC systems.
|
||||
|
||||
If you obtained this as a snapshot, you will need an existing
|
||||
Mono installation. To upgrade your installation, unpack both
|
||||
@@ -93,11 +83,10 @@ This is Mono.
|
||||
|
||||
If you don't have a working Mono installation, an obvious choice
|
||||
is to install the latest released packages of 'mono' for your
|
||||
distribution and running autogen.sh; make; make install in the
|
||||
mono module directory.
|
||||
distribution and try from the beginning.
|
||||
|
||||
You can also try a slightly more risky approach: this may not work,
|
||||
so start from the released tarball as detailed above.
|
||||
You can also try a slightly more risky approach that should work
|
||||
almost all the time.
|
||||
|
||||
This works by first getting the latest version of the 'monolite'
|
||||
distribution, which contains just enough to run the 'mcs'
|
||||
@@ -148,6 +137,8 @@ This is Mono.
|
||||
* runtime engine
|
||||
|
||||
mono program.exe
|
||||
or
|
||||
mint program.exe
|
||||
|
||||
* C# compiler
|
||||
|
||||
@@ -163,6 +154,9 @@ This is Mono.
|
||||
3. Directory Roadmap
|
||||
====================
|
||||
|
||||
doc/
|
||||
Contains the web site contents.
|
||||
|
||||
docs/
|
||||
Technical documents about the Mono runtime.
|
||||
|
||||
@@ -175,7 +169,7 @@ This is Mono.
|
||||
metadata/
|
||||
The object system and metadata reader.
|
||||
|
||||
mini/
|
||||
jit/
|
||||
The Just in Time Compiler.
|
||||
|
||||
dis/
|
||||
@@ -193,7 +187,7 @@ This is Mono.
|
||||
definition of the CIL bytecodes.
|
||||
|
||||
interp/
|
||||
Interpreter for CLI executables (obsolete).
|
||||
Interpreter for CLI executables.
|
||||
|
||||
arch/
|
||||
Architecture specific portions.
|
||||
|
||||
+12
-21
@@ -1,8 +1,8 @@
|
||||
README.vsnet Last updated: 2006-02-01
|
||||
README.vsnet Last updated: 2005-05-26
|
||||
|
||||
|
||||
SVN includes a Visual Studio .NET 2005 solution, mono.sln, and some
|
||||
projects files to build most of the unmanaged parts in Mono.
|
||||
SVN now includes a Visual Studio .NET 2005 (beta2) solution, mono.sln,
|
||||
and some projects files to build most of the unmanaged parts in Mono.
|
||||
|
||||
The "mono.sln" solution file contains the VC projects files for:
|
||||
|
||||
@@ -30,12 +30,12 @@ REQUIREMENTS
|
||||
* build the class libraries; and
|
||||
* test for regressions.
|
||||
|
||||
* Visual Studio .NET 2005. Previous Visual Studio versions may work or
|
||||
requires, hopefully minimal, changes.
|
||||
* Visual Studio .NET 2005 beta2. Previous Visual Studio versions may
|
||||
work or requires, hopefully minimal, changes.
|
||||
|
||||
* VSDependencies.zip must be decompressed under the /mono/ directory
|
||||
(otherwise you will need to edit all the projects files). This file can
|
||||
be downloaded from http://www.go-mono.com/archive/VSDependencies.zip
|
||||
* VSDependencies.zip must be decompressed under /mono/ (otherwise you
|
||||
will need to edit all the projects files. This file can be downloaded
|
||||
from http://www.go-mono.com/archive/VSDependencies.zip
|
||||
|
||||
|
||||
LOCAL CHANGES
|
||||
@@ -85,11 +85,9 @@ requires a working cygwin environment to create some files (e.g. via
|
||||
genmdesc, monoburg). This isn't so bad as without cygwin you wouldn't be
|
||||
able to test Mono properly (see REQUIREMENTS);
|
||||
|
||||
[3] Only the Debug target is configured properly (that would be easy to
|
||||
fix, but would require turning off some optimizations like omitting
|
||||
stack frames). Anyway there are other issues [1] to fix before switching
|
||||
to Release and IMHO the _biggest_ advantage to VS.NET is it's debugger/
|
||||
debugging tools;
|
||||
[3] Only the Debug target is configured properly (easy to fix). Anyway
|
||||
there are other issues [1] to fix before switching to Release and IMHO
|
||||
the _biggest_ advantage to VS.NET is it's debugger/debugging tools;
|
||||
|
||||
[4] The C compiler emits _lots_ of warning during compilation. Some
|
||||
warnings have been turned off for some projects (there was so much that
|
||||
@@ -103,17 +101,10 @@ Platform SDK (Windows Server 2003 is the latest) to ensure you have the
|
||||
latest Windows header files. You can download it from:
|
||||
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
|
||||
|
||||
[6] Not everyone has VS.NET so it is possible you may have to add some
|
||||
(new) files to the build from time to time. See "more informations" for
|
||||
reporting those changes.
|
||||
|
||||
[7] Probably a lot more I didn't discover... or has changed since.
|
||||
[6] Probably a lot more I didn't discover...
|
||||
|
||||
|
||||
MORE INFORMATIONS
|
||||
|
||||
Please email <[email protected]> if you have any problem
|
||||
and/or if there's something wrong/missing in the instructions.
|
||||
|
||||
An online version of this file is available at
|
||||
http://www.mono-project.com/Mono:Windows
|
||||
@@ -5,7 +5,6 @@
|
||||
#undef HAVE_SOL_TCP
|
||||
#undef HAVE_SOL_IPV6
|
||||
#undef HAVE_IP_PKTINFO
|
||||
#undef HAVE_IPV6_PKTINFO
|
||||
#undef HAVE_STRUCT_IP_MREQN
|
||||
#undef HAVE_STRUCT_IP_MREQ
|
||||
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
|
||||
+46
-218
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
|
||||
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono,1.1.13)
|
||||
AM_INIT_AUTOMAKE(mono,1.1.8.3)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PROG_LN_S
|
||||
@@ -25,7 +25,6 @@ dnl
|
||||
gc_headers=no
|
||||
gc=included
|
||||
use_included_gc=no
|
||||
libgc_configure_args=
|
||||
|
||||
if test -d $srcdir/libgc ; then
|
||||
gc_default=included
|
||||
@@ -42,11 +41,6 @@ libmono_ldflags=""
|
||||
AC_SUBST(libmono_cflags)
|
||||
AC_SUBST(libmono_ldflags)
|
||||
|
||||
# Variable to have relocatable .pc files (lib, or lib64)
|
||||
reloc_libdir=`basename ${libdir}`
|
||||
AC_SUBST(reloc_libdir)
|
||||
|
||||
|
||||
dnl if linker handles the version script
|
||||
no_version_script=no
|
||||
|
||||
@@ -60,12 +54,12 @@ case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
platform_win32=yes
|
||||
AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
|
||||
if test "x$cross_compiling" = "xno"; then
|
||||
CC="gcc -mno-cygwin -g"
|
||||
# So libgc configure gets -mno-cygwin
|
||||
export CC
|
||||
fi
|
||||
CC="gcc -mno-cygwin -g"
|
||||
HOST_CC="gcc"
|
||||
# So libgc configure gets -mno-cygwin
|
||||
export CC
|
||||
# latest libgc already defines GC_WIN32_THREADS
|
||||
# CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
|
||||
CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024"
|
||||
libdl=
|
||||
libgc_threads=win32
|
||||
@@ -73,15 +67,12 @@ case "$host" in
|
||||
with_nptl=default
|
||||
with_sigaltstack=no
|
||||
LN_S=cp
|
||||
# This forces libgc to use the DllMain based thread registration code on win32
|
||||
libgc_configure_args="$libgc_configure_args --enable-win32-dllmain=yes"
|
||||
;;
|
||||
*-*-*netbsd*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
|
||||
libmono_ldflags="-pthread"
|
||||
need_link_unlink=yes
|
||||
libdl=
|
||||
@@ -105,7 +96,6 @@ case "$host" in
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
|
||||
libmono_ldflags="$PTHREAD_LIBS"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD4"
|
||||
need_link_unlink=yes
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
@@ -130,7 +120,6 @@ case "$host" in
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
|
||||
libmono_ldflags="$PTHREAD_LIBS"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD5"
|
||||
need_link_unlink=yes
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
@@ -157,7 +146,6 @@ case "$host" in
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
|
||||
libmono_ldflags="$PTHREAD_LIBS"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD6"
|
||||
need_link_unlink=yes
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
@@ -181,7 +169,7 @@ case "$host" in
|
||||
;;
|
||||
*-*-linux*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
libmono_ldflags="-lpthread"
|
||||
libdl="-ldl"
|
||||
@@ -199,14 +187,14 @@ case "$host" in
|
||||
;;
|
||||
*-*-solaris*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
|
||||
need_link_unlink=yes
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
libgc_threads=pthreads
|
||||
;;
|
||||
*-*-darwin*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX"
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
@@ -253,25 +241,19 @@ dnl may require a specific autoconf version
|
||||
dnl AC_PROG_CC_FOR_BUILD
|
||||
dnl CC_FOR_BUILD not automatically detected
|
||||
CC_FOR_BUILD=$CC
|
||||
CFLAGS_FOR_BUILD=$CFLAGS
|
||||
BUILD_EXEEXT=
|
||||
if test "x$cross_compiling" = "xyes"; then
|
||||
CC_FOR_BUILD=cc
|
||||
CFLAGS_FOR_BUILD=
|
||||
BUILD_EXEEXT=""
|
||||
fi
|
||||
AC_SUBST(CC_FOR_BUILD)
|
||||
AC_SUBST(CFLAGS_FOR_BUILD)
|
||||
AC_SUBST(HOST_CC)
|
||||
AC_SUBST(BUILD_EXEEXT)
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
|
||||
|
||||
# Set STDC_HEADERS
|
||||
AC_HEADER_STDC
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
# This causes monodis to not link correctly
|
||||
#AC_DISABLE_FAST_INSTALL
|
||||
AC_DISABLE_FAST_INSTALL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
# Test whenever ld supports -version-script
|
||||
@@ -365,9 +347,6 @@ fi
|
||||
mcs_topdir='$(top_srcdir)/'$mcsdir
|
||||
mcs_topdir_from_srcdir='$(top_builddir)/'$mcsdir
|
||||
|
||||
## Maybe should also disable if mcsdir is invalid. Let's punt the issue for now.
|
||||
AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno])
|
||||
|
||||
AC_SUBST([mcs_topdir])
|
||||
AC_SUBST([mcs_topdir_from_srcdir])
|
||||
|
||||
@@ -423,7 +402,7 @@ AC_SUBST(GLIB_LIBS)
|
||||
AC_SUBST(GMODULE_CFLAGS)
|
||||
AC_SUBST(GMODULE_LIBS)
|
||||
|
||||
if test x$cross_compiling$platform_win32 = xnoyes; then
|
||||
if test x$platform_win32 = xyes; then
|
||||
AC_MSG_CHECKING(for cygwin glib2-dev package)
|
||||
if [ cygcheck --f /usr/lib/libglib-2.0.dll.a | grep -q glib2-devel ]; then
|
||||
AC_MSG_RESULT(found)
|
||||
@@ -474,45 +453,18 @@ if test "x$enable_static" = "xno"; then
|
||||
with_static_mono=no
|
||||
fi
|
||||
|
||||
if test "x$platform_win32" = "xyes"; then
|
||||
# Boehm GC requires the runtime to be in its own dll
|
||||
with_static_mono=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
|
||||
|
||||
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour],[],[with_xen_opt=yes])
|
||||
if test "x$with_xen_opt" = "xyes"; then
|
||||
AC_DEFINE(MONO_XEN_OPT, 1, [Xen-specific behaviour])
|
||||
ORIG_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -mno-tls-direct-seg-refs"
|
||||
AC_MSG_CHECKING(for -mno-tls-direct-seg-refs option to gcc)
|
||||
AC_TRY_COMPILE([], [
|
||||
void main () { }
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
CFLAGS=$ORIG_CFLAGS
|
||||
])
|
||||
fi
|
||||
|
||||
DISABLED_FEATURES=none
|
||||
|
||||
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
|
||||
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
|
||||
reflection_emit, large_code, logging, com, ssa, generics.],
|
||||
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, reflection_emit.],
|
||||
[
|
||||
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
|
||||
eval "mono_feature_disable_$feature='yes'"
|
||||
AC_MSG_NOTICE([Disabled support for feature: $feature])
|
||||
done
|
||||
DISABLED_FEATURES=$enable_minimal
|
||||
disabled="Disabled: $enable_minimal"
|
||||
],[])
|
||||
|
||||
AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
|
||||
|
||||
if test "x$mono_feature_disable_aot" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_AOT, 1, [Disable AOT support])
|
||||
fi
|
||||
@@ -537,37 +489,6 @@ if test "x$mono_feature_disable_reflection_emit" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_large_code" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_logging" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_LOGGING, 1, [Disable support debug logging])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_com" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_COM, 1, [Disable COM support])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_ssa" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_generics" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_GENERICS, 1, [Disable generics support])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for visibility __attribute__)
|
||||
AC_TRY_COMPILE([], [
|
||||
void __attribute__ ((visibility ("hidden"))) doit (void) {}
|
||||
void main () { doit (); }
|
||||
], [
|
||||
AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute])
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
LIBGC_CFLAGS=
|
||||
LIBGC_LIBS=
|
||||
LIBGC_STATIC_LIBS=
|
||||
@@ -638,7 +559,7 @@ if test "x$large_heap" = "xyes"; then
|
||||
fi
|
||||
|
||||
# tell libgc/configure about what we want
|
||||
ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args"
|
||||
ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads"
|
||||
|
||||
AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
|
||||
AC_SUBST(LIBGC_CFLAGS)
|
||||
@@ -665,8 +586,6 @@ if test x$platform_win32 = xno; then
|
||||
|
||||
AC_SUBST(ikvm_native_dir)
|
||||
|
||||
AC_CHECK_HEADERS(execinfo.h)
|
||||
|
||||
AC_CHECK_FUNCS(getgrgid_r)
|
||||
AC_CHECK_FUNCS(getgrnam_r)
|
||||
AC_CHECK_FUNCS(getpwnam_r)
|
||||
@@ -802,20 +721,6 @@ if test x$platform_win32 = xno; then
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl *****************************
|
||||
dnl *** Checks for IPV6_PKTINFO ***
|
||||
dnl *****************************
|
||||
AC_MSG_CHECKING(for IPV6_PKTINFO)
|
||||
AC_TRY_COMPILE([#include <netdb.h>], [
|
||||
int level = IPV6_PKTINFO;
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_IPV6_PKTINFO)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Check for struct ip_mreqn ***
|
||||
dnl *********************************
|
||||
@@ -963,8 +868,6 @@ if test x$platform_win32 = xno; then
|
||||
AC_DEFINE(USE_MONO_MUTEX)
|
||||
])
|
||||
AC_CHECK_FUNCS(pthread_attr_setstacksize)
|
||||
AC_CHECK_FUNCS(pthread_attr_getstack)
|
||||
AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
|
||||
|
||||
dnl ***********************************
|
||||
dnl *** Checks for working __thread ***
|
||||
@@ -1249,29 +1152,18 @@ if test x$platform_win32 = xno; then
|
||||
dnl **********************************
|
||||
dnl *** Checks for MonoPosixHelper ***
|
||||
dnl **********************************
|
||||
AC_CHECK_FUNC(setkey, ,
|
||||
AC_CHECK_LIB(crypt, setkey, [
|
||||
AC_DEFINE(HAVE_SETKEY, 1, [Define if setkey(3) is available])
|
||||
CRYPT_LIBS="-lcrypt"
|
||||
])
|
||||
)
|
||||
AC_SUBST(CRYPT_LIBS)
|
||||
AC_CHECK_HEADERS(checklist.h)
|
||||
AC_CHECK_HEADERS(fstab.h)
|
||||
AC_CHECK_HEADERS(attr/xattr.h)
|
||||
AC_CHECK_HEADERS(sys/extattr.h)
|
||||
AC_CHECK_HEADERS(sys/sendfile.h)
|
||||
AC_CHECK_HEADERS(sys/statvfs.h)
|
||||
AC_CHECK_HEADERS(sys/vfstab.h)
|
||||
AC_CHECK_HEADERS(sys/xattr.h)
|
||||
AC_CHECK_HEADERS(sys/mman.h)
|
||||
AC_CHECK_FUNCS(getdomainname)
|
||||
AC_CHECK_FUNCS(setdomainname)
|
||||
AC_CHECK_FUNCS(fgetgrent)
|
||||
AC_CHECK_FUNCS(fgetpwent)
|
||||
AC_CHECK_FUNCS(fgetpwent)
|
||||
AC_CHECK_FUNCS(getfsstat)
|
||||
AC_CHECK_FUNCS(lutimes)
|
||||
AC_CHECK_FUNCS(mremap)
|
||||
AC_CHECK_FUNCS(remap_file_pages)
|
||||
AC_CHECK_FUNCS(posix_fadvise)
|
||||
@@ -1293,12 +1185,6 @@ if test x$platform_win32 = xno; then
|
||||
[#include <sys/types.h>
|
||||
#include <dirent.h>])
|
||||
|
||||
dnl Favour xattr through glibc, but use libattr if we have to
|
||||
AC_CHECK_FUNC(lsetxattr, ,
|
||||
AC_CHECK_LIB(attr, lsetxattr, XATTR_LIB="-lattr",)
|
||||
)
|
||||
AC_SUBST(XATTR_LIB)
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Check for Console 2.0 I/O ***
|
||||
dnl *********************************
|
||||
@@ -1309,10 +1195,6 @@ if test x$platform_win32 = xno; then
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_HEADERS([termios.h])
|
||||
|
||||
dnl * This is provided in io-layer, but on windows it's only available
|
||||
dnl * on xp+
|
||||
AC_DEFINE(HAVE_GETPROCESSID, 1, [Define if GetProcessId is available])
|
||||
else
|
||||
jdk_headers_found=no
|
||||
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
|
||||
@@ -1346,7 +1228,6 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
AC_CHECK_FUNCS(GetProcessId)
|
||||
fi
|
||||
|
||||
dnl socklen_t check
|
||||
@@ -1491,11 +1372,6 @@ case "$host" in
|
||||
arch_target=x86;
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
case $host_os in
|
||||
solaris*)
|
||||
LIBC="libc.so"
|
||||
INTL="libintl.so"
|
||||
esac
|
||||
;;
|
||||
x86_64-*-* | amd64-*-*)
|
||||
TARGET=AMD64;
|
||||
@@ -1503,17 +1379,6 @@ case "$host" in
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
;;
|
||||
ia64-*-*)
|
||||
TARGET=IA64
|
||||
arch_target=ia64
|
||||
ACCESS_UNALIGNED="no"
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
LIBC="libc.so.6.1"
|
||||
INTL="libc.so.6.1"
|
||||
AC_CHECK_LIB(unwind, _U_dyn_register, [], [AC_MSG_ERROR(library libunwind not found)])
|
||||
libmono_ldflags="-lunwind"
|
||||
;;
|
||||
sparc*-*-*)
|
||||
if test "x$ac_cv_sizeof_void_p" = "x8"; then
|
||||
TARGET=SPARC64
|
||||
@@ -1550,6 +1415,19 @@ case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
INTL="intl"
|
||||
;;
|
||||
# ia64-*-linux* | ia64-*-hpux*)
|
||||
# TARGET=IA64;
|
||||
# arch_target=ia64;
|
||||
# JIT_SUPPORTED=no;
|
||||
# ACCESS_UNALIGNED="no";
|
||||
# case "$host_os" in
|
||||
# linux*) LIBC="libc.so.6.1";;
|
||||
# hpux*) LIBC="libc.so.1";;
|
||||
# esac
|
||||
# ;;
|
||||
# m68k-*-linux*)
|
||||
# TARGET=M68K
|
||||
# ;;
|
||||
hppa2.0w-hp-hpux11.00 | hppa64-hp-hpux11.00)
|
||||
TARGET=HPPA;
|
||||
arch_target=hppa;
|
||||
@@ -1573,12 +1451,12 @@ case "$host" in
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
;;
|
||||
arm*-linux*)
|
||||
arm-*-linux-* | armv4l-*-linux-*)
|
||||
TARGET=ARM;
|
||||
arch_target=arm;
|
||||
ACCESS_UNALIGNED="no"
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
INTERP_SUPPORTED=yes
|
||||
interp_wanted=true
|
||||
;;
|
||||
s390-*-linux*)
|
||||
TARGET=S390;
|
||||
@@ -1586,7 +1464,6 @@ case "$host" in
|
||||
arch_target=s390;
|
||||
ACCESS_UNALIGNED="no"
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
;;
|
||||
s390x-*-linux*)
|
||||
TARGET=S390x;
|
||||
@@ -1594,7 +1471,6 @@ case "$host" in
|
||||
arch_target=s390x;
|
||||
ACCESS_UNALIGNED="no"
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1627,7 +1503,7 @@ if test x$JIT_SUPPORTED = xyes; then
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test x$interp_wanted = xtrue; then
|
||||
if $interp_wanted; then
|
||||
jit_status="interpreter"
|
||||
else
|
||||
AC_ERROR(No JIT or interpreter support available or selected.)
|
||||
@@ -1639,7 +1515,7 @@ AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
|
||||
libsuffix=".so"
|
||||
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
powerpc-*-darwin*)
|
||||
libsuffix=".dylib"
|
||||
LIBC="libc.dylib"
|
||||
INTL="libintl.dylib"
|
||||
@@ -1677,7 +1553,6 @@ case "$host" in
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
AC_SUBST(libsuffix)
|
||||
|
||||
if test "x$TARGET" != "xAMD64"; then
|
||||
@@ -1694,8 +1569,8 @@ if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
|
||||
#
|
||||
rm -f conftest.c conftest.so conftest
|
||||
echo "static __thread int foo; void main () { foo = 5; }" > conftest.c
|
||||
$CC -fPIC --shared -o conftest.so conftest.c > /dev/null 2>&1
|
||||
$CC -o conftest conftest.so > /dev/null 2>&1
|
||||
gcc -fPIC --shared -o conftest.so conftest.c > /dev/null 2>&1
|
||||
gcc -o conftest conftest.so > /dev/null 2>&1
|
||||
if test ! -f conftest; then
|
||||
AC_MSG_WARN([Disabling usage of __thread.]);
|
||||
with_tls=pthread
|
||||
@@ -1704,22 +1579,6 @@ if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
mono_debugger_supported=no
|
||||
if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
|
||||
case "$host" in
|
||||
*-*-*linux*)
|
||||
mono_debugger_supported=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(if the Mono Debugger is supported on this platform)
|
||||
if test "x$mono_debugger_supported" = "xyes"; then
|
||||
AC_DEFINE(MONO_DEBUGGER_SUPPORTED,1,[The Mono Debugger is supported on this platform])
|
||||
fi
|
||||
AC_MSG_RESULT($mono_debugger_supported)
|
||||
AM_CONDITIONAL(MONO_DEBUGGER_SUPPORTED, test x$mono_debugger_supported = xyes)
|
||||
|
||||
if test "x$with_tls" = "x__thread"; then
|
||||
AC_DEFINE(HAVE_KW_THREAD)
|
||||
# Pass the information to libgc
|
||||
@@ -1822,12 +1681,11 @@ AC_SUBST(mono_cfg_dir)
|
||||
|
||||
AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
|
||||
AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper])
|
||||
AC_CONFIG_FILES([runtime/semdel-wrapper],[chmod +x runtime/semdel-wrapper])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
[\\/$]* | ?:[\\/]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
@@ -1841,7 +1699,7 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
[\\/$]* | ?:[\\/]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
@@ -1856,9 +1714,6 @@ AC_OUTPUT([
|
||||
Makefile
|
||||
mint.pc
|
||||
mono.pc
|
||||
mono-cairo.pc
|
||||
dotnet.pc
|
||||
mono-uninstalled.pc
|
||||
scripts/mono-nunit.pc
|
||||
scripts/mono-find-provides
|
||||
scripts/mono-find-requires
|
||||
@@ -1869,6 +1724,8 @@ mono/dis/Makefile
|
||||
mono/cil/Makefile
|
||||
mono/arch/Makefile
|
||||
mono/os/Makefile
|
||||
mono/os/win32/Makefile
|
||||
mono/os/unix/Makefile
|
||||
mono/arch/x86/Makefile
|
||||
mono/arch/amd64/Makefile
|
||||
mono/arch/hppa/Makefile
|
||||
@@ -1905,15 +1762,6 @@ tools/locale-builder/Makefile
|
||||
runtime/Makefile
|
||||
])
|
||||
|
||||
if test x$platform_win32 = xyes; then
|
||||
# Get rid of 'cyg' prefixes in library names
|
||||
sed -e "s/\/cyg\//\/\//" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
|
||||
# libtool seems to inherit -mno-cygwin from our CFLAGS, and uses it to compile its executable
|
||||
# wrapper scripts which use exec(). gcc has no problem compiling+linking this, but the resulting
|
||||
# executable doesn't work...
|
||||
sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
|
||||
fi
|
||||
|
||||
(
|
||||
case $prefix in
|
||||
NONE) prefix=$ac_default_prefix ;;
|
||||
@@ -1924,35 +1772,14 @@ fi
|
||||
|
||||
test -w $srcdir/$mcsdir/build || chmod +w $srcdir/$mcsdir/build
|
||||
|
||||
#
|
||||
# If we are cross compiling, we don't build in the mcs/ tree. Let us not clobber
|
||||
# any existing config.make. This allows people to share the same source tree
|
||||
# with different build directories, one native and one cross
|
||||
#
|
||||
if test x$cross_compiling = xno; then
|
||||
echo "prefix=$prefix" > $srcdir/$mcsdir/build/config.make
|
||||
echo "exec_prefix=$exec_prefix" >> $srcdir/$mcsdir/build/config.make
|
||||
echo 'mono_libdir=${exec_prefix}/lib' >> $srcdir/$mcsdir/build/config.make
|
||||
echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$mcsdir/build/config.make
|
||||
echo 'IL_FLAGS = /debug' >> $srcdir/$mcsdir/build/config.make
|
||||
echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "ILDISASM = $mono_build_root/runtime/monodis-wrapper" >> $srcdir/$mcsdir/build/config.make
|
||||
|
||||
case $INSTALL in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) mcs_INSTALL=$INSTALL ;;
|
||||
*) mcs_INSTALL=$mono_build_root/$INSTALL ;;
|
||||
esac
|
||||
|
||||
echo "INSTALL = $mcs_INSTALL" >> $srcdir/$mcsdir/build/config.make
|
||||
|
||||
export VERSION
|
||||
[myver=$($AWK 'BEGIN {
|
||||
split (ENVIRON["VERSION"] ".0.0.0", vsplit, ".")
|
||||
print vsplit [1] "." vsplit [2] "." vsplit [3] "." vsplit [4]
|
||||
}')]
|
||||
|
||||
echo "MONO_VERSION = $myver" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
echo "prefix=$prefix" > $srcdir/$mcsdir/build/config.make
|
||||
echo "exec_prefix=$exec_prefix" >> $srcdir/$mcsdir/build/config.make
|
||||
echo 'mono_libdir=${exec_prefix}/lib' >> $srcdir/$mcsdir/build/config.make
|
||||
echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$mcsdir/build/config.make
|
||||
echo 'IL_FLAGS = /debug' >> $srcdir/$mcsdir/build/config.make
|
||||
echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "ILDISASM = $mono_build_root/runtime/monodis-wrapper" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "INSTALL = $INSTALL" >> $srcdir/$mcsdir/build/config.make
|
||||
)
|
||||
|
||||
libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
|
||||
@@ -1960,6 +1787,7 @@ libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
|
||||
echo "
|
||||
mcs source: $mcs_topdir
|
||||
GC: $gc
|
||||
Globalization: $enable_glob
|
||||
TLS: $with_tls
|
||||
SIGALTSTACK: $with_sigaltstack
|
||||
Engine: $jit_status
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ SUBDIRS = net_1_1 net_2_0
|
||||
monodir = $(sysconfdir)/mono
|
||||
|
||||
EXTRA_DIST = config.in \
|
||||
browscap.ini mono.supp README
|
||||
browscap.ini
|
||||
|
||||
mono_DATA = config \
|
||||
browscap.ini
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
Files in this directory:
|
||||
|
||||
config.in, config:
|
||||
These files are installed into $prefix/etc/mono and
|
||||
contain the global mappings of dllnames into native
|
||||
library names.
|
||||
|
||||
browscap.ini
|
||||
This file contains the browser capabilty database,
|
||||
this is used by ASP.NET to determine in a per-browser
|
||||
basis what kind of features it can depend on when
|
||||
producing the HTML code.
|
||||
|
||||
mono.supp
|
||||
This is a valgrind data file, it lists the warnings
|
||||
that should be supressed when reporting Mono-related
|
||||
errors.
|
||||
|
||||
net_1_1 and net_2_0
|
||||
They contain profile-specific data files
|
||||
+4911
-5179
File diff suppressed because it is too large.
Load diff
+2
-3
@@ -1,16 +1,15 @@
|
||||
<configuration>
|
||||
<dllmap dll="cygwin1.dll" target="@LIBC@" />
|
||||
<dllmap dll="libc" target="@LIBC@" />
|
||||
<dllmap dll="intl" target="@INTL@" />
|
||||
<dllmap dll="libintl" target="@INTL@" />
|
||||
<dllmap dll="libxslt.dll" target="libxslt@libsuffix@" />
|
||||
<dllmap dll="libmySQL.dll" target="libmysqlclient@libsuffix@" />
|
||||
<dllmap dll="odbc32.dll" target="libodbc@libsuffix@" />
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" />
|
||||
<dllmap dll="oci" target="clntsh" />
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@"/>
|
||||
<dllmap dll="msvcrt" target="@LIBC@"/>
|
||||
<dllmap dll="MonoPosixHelper" target="libMonoPosixHelper@libsuffix@"/>
|
||||
<dllmap dll="sqlite" target="@SQLITE@"/>
|
||||
<dllmap dll="sqlite3" target="@SQLITE3@"/>
|
||||
<dllmap dll="libX11" target="@X11@"/>
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.so.2"/>
|
||||
</configuration>
|
||||
@@ -1,33 +0,0 @@
|
||||
##
|
||||
## mono-specific suppressions (Boehm-GC) for use with valgrind
|
||||
##
|
||||
|
||||
{
|
||||
mono - Conditional jump or move depends on uninitialised value
|
||||
Memcheck:Cond
|
||||
fun:GC_*
|
||||
fun:*
|
||||
obj:/usr/local/bin/mono
|
||||
}
|
||||
{
|
||||
mono - Use of uninitialized value of size 4
|
||||
Memcheck:Value4
|
||||
fun:GC_*
|
||||
fun:*
|
||||
obj:/usr/local/bin/mono
|
||||
}
|
||||
{
|
||||
mono - Use of uninitialized value of size 1
|
||||
Memcheck:Value1
|
||||
fun:GC_*
|
||||
fun:*
|
||||
obj:/usr/local/bin/mono
|
||||
}
|
||||
{
|
||||
mono - Invalid read of size 4
|
||||
Memcheck:Addr4
|
||||
fun:GC_*
|
||||
fun:*
|
||||
obj:/usr/local/bin/mono
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -62,11 +62,9 @@
|
||||
<add type="System.Net.NtlmClient, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</authenticationModules>
|
||||
<defaultProxy>
|
||||
<proxy
|
||||
usesystemdefault = "true"
|
||||
bypassonlocal = "true"
|
||||
/>
|
||||
<!-- proxyaddress can also be set -->
|
||||
<proxy />
|
||||
<!-- bypassonlocal and proxyaddress are ok -->
|
||||
<!-- usessystemdefault is not supported -->
|
||||
</defaultProxy>
|
||||
<webRequestModules>
|
||||
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
@@ -87,9 +85,7 @@
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
|
||||
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
@@ -146,13 +142,8 @@
|
||||
<add assembly="*" /> <!-- Add assemblies in bin directory -->
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<!--
|
||||
RequestLengthDiskThreshold is a 2.0 feature that we
|
||||
enable for 1.x too.
|
||||
-->
|
||||
<httpRuntime executionTimeout="90"
|
||||
maxRequestLength="4096"
|
||||
requestLengthDiskThreshold="256"
|
||||
useFullyQualifiedRedirectUrl="false"
|
||||
minFreeThreads="8"
|
||||
minLocalRequestFreeThreads="4"
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
monodir = $(sysconfdir)/mono/2.0
|
||||
|
||||
EXTRA_DIST = machine.config \
|
||||
web.config \
|
||||
DefaultWsdlHelpGenerator.aspx
|
||||
DefaultWsdlHelpGenerator.aspx
|
||||
|
||||
mono_DATA = machine.config \
|
||||
web.config \
|
||||
DefaultWsdlHelpGenerator.aspx
|
||||
|
||||
+146
-78
@@ -3,120 +3,188 @@
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<section name="configProtectedData" type="System.Configuration.ProtectedConfigurationSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="connectionStrings" type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="globalization" type="System.Web.Configuration.GlobalizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpRuntime" type="System.Web.Configuration.HttpRuntimeSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="pages" type="System.Web.Configuration.PagesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="trace" type="System.Web.Configuration.TraceSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<sectionGroup name="caching" type="System.Web.Configuration.SystemWebCachingSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</sectionGroup>
|
||||
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSectionHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<section name="strongNames" type="System.Configuration.IgnoreSectionHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<sectionGroup name="system.web">
|
||||
<section name="httpHandlers"
|
||||
type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpModules"
|
||||
type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="machineKey"
|
||||
type="System.Web.Configuration.MachineKeyConfigHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="authentication"
|
||||
type="System.Web.Configuration.AuthenticationConfigHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="authorization"
|
||||
type="System.Web.Configuration.AuthorizationConfigHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="globalization"
|
||||
type="System.Web.Configuration.GlobalizationConfigurationHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="sessionState"
|
||||
type="System.Web.SessionState.SessionStateSectionHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="trace"
|
||||
type="System.Web.Configuration.TraceConfigurationHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="webServices"
|
||||
type="System.Web.Services.Configuration.WebServicesConfigurationSectionHandler, System.Web.Services, Version=2.0.3600.0 Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="webControls"
|
||||
type="System.Web.Configuration.WebControlsSectionHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="compilation"
|
||||
type="System.Web.Configuration.CompilationConfigurationHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpRuntime"
|
||||
type="System.Web.Configuration.HttpRuntimeConfigurationHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="customErrors"
|
||||
type="System.Web.Configuration.CustomErrorsConfigHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="pages"
|
||||
type="System.Web.Configuration.PagesConfigurationHandler, System.Web, Version=2.0.3600.0, Culture=neutral" />
|
||||
<section name="clientTarget"
|
||||
type="System.Web.Configuration.ClientTargetSectionHandler, System.Web, Version=2.0.3600.0, Culture=neutral" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.net">
|
||||
<section name="settings"
|
||||
type="System.Net.Configuration.SettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
type="System.Net.Configuration.NetConfigurationHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="connectionManagement"
|
||||
type="System.Net.Configuration.ConnectionManagementHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
type="System.Net.Configuration.ConnectionManagementHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="authenticationModules"
|
||||
type="System.Net.Configuration.NetAuthenticationModuleHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
type="System.Net.Configuration.NetAuthenticationModuleHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="defaultProxy"
|
||||
type="System.Net.Configuration.DefaultProxyHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
type="System.Net.Configuration.DefaultProxyHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="webRequestModules"
|
||||
type="System.Net.Configuration.WebRequestModuleHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
type="System.Net.Configuration.WebRequestModuleHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</sectionGroup>
|
||||
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</configSections>
|
||||
|
||||
<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
|
||||
<providers>
|
||||
<add name="RsaProtectedConfigurationProvider" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
description="" keyContainerName="MonoFrameworkConfigurationKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
|
||||
<add name="DataProtectionConfigurationProvider" type="System.Configuration.DpapiProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
description="" useMachineProtection="true" keyEntropy="" />
|
||||
</providers>
|
||||
</configProtectedData>
|
||||
|
||||
<system.net>
|
||||
<connectionManagement>
|
||||
<add address="*" maxconnection="2" />
|
||||
</connectionManagement>
|
||||
<authenticationModules>
|
||||
<add type="System.Net.BasicClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add type="System.Net.DigestClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add type="System.Net.NtlmClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add type="System.Net.BasicClient, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add type="System.Net.DigestClient, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add type="System.Net.NtlmClient, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</authenticationModules>
|
||||
<defaultProxy>
|
||||
<proxy
|
||||
usesystemdefault = "true"
|
||||
bypassonlocal = "true"
|
||||
/>
|
||||
<!-- proxyaddress can also be set -->
|
||||
<proxy />
|
||||
<!-- bypassonlocal and proxyaddress are ok -->
|
||||
<!-- usessystemdefault is not supported -->
|
||||
</defaultProxy>
|
||||
<webRequestModules>
|
||||
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
|
||||
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</httpHandlers>
|
||||
<httpModules>
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</httpModules>
|
||||
<authentication mode="Forms">
|
||||
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
|
||||
<credentials passwordFormat="Clear">
|
||||
<!--<user name="gonzalo" password="gonz"/>-->
|
||||
</credentials>
|
||||
</forms>
|
||||
</authentication>
|
||||
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
|
||||
<globalization requestEncoding="utf-8"
|
||||
responseEncoding="utf-8"
|
||||
fileEncoding="utf-8"/>
|
||||
<!--
|
||||
culture="en-US"
|
||||
uiculture="en-US" />
|
||||
-->
|
||||
<sessionState mode="InProc" />
|
||||
<webServices>
|
||||
<protocols>
|
||||
<add name="HttpSoap"/>
|
||||
<add name="HttpPost"/>
|
||||
<add name="HttpGet"/>
|
||||
<add name="Documentation"/>
|
||||
</protocols>
|
||||
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
|
||||
</webServices>
|
||||
<webControls clientScriptsLocation="/web_scripts" />
|
||||
<compilation debug="false" defaultLanguage="c#" explicit="true" strict="false" >
|
||||
<compilers>
|
||||
<compiler language="cs;c#;csharp" extension=".cs" warningLevel="1" compilerOptions=""
|
||||
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
|
||||
warningLevel="1" compilerOptions=""
|
||||
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</compilers>
|
||||
<assemblies>
|
||||
<!--<add assembly="mscorlib" /> -->
|
||||
<add assembly="System" />
|
||||
<add assembly="System.Xml" />
|
||||
<add assembly="System.Data" />
|
||||
<add assembly="System.Web" />
|
||||
<add assembly="System.Web.Services" />
|
||||
<add assembly="System.Drawing" />
|
||||
<add assembly="*" /> <!-- Add assemblies in bin directory -->
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<httpRuntime executionTimeout="90"
|
||||
maxRequestLength="4096"
|
||||
useFullyQualifiedRedirectUrl="false"
|
||||
minFreeThreads="8"
|
||||
minLocalRequestFreeThreads="4"
|
||||
appRequestQueueLimit="100" />
|
||||
<pages buffer="true"
|
||||
enableSessionState="true"
|
||||
autoEventWireup="true"
|
||||
validateRequest="true" />
|
||||
<clientTarget>
|
||||
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
|
||||
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
|
||||
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
|
||||
<add alias="downlevel" userAgent="Unknown" />
|
||||
</clientTarget>
|
||||
</system.web>
|
||||
|
||||
<system.runtime.remoting>
|
||||
<application>
|
||||
<channels>
|
||||
<channel ref="http client" displayName="http client (delay loaded)" delayLoadAsClientChannel="true" />
|
||||
<channel ref="tcp client" displayName="tcp client (delay loaded)" delayLoadAsClientChannel="true" />
|
||||
<channel ref="ipc client" displayName="ipc client (delay loaded)" delayLoadAsClientChannel="true" />
|
||||
</channels>
|
||||
</application>
|
||||
<channels>
|
||||
<channel id="http" type="System.Runtime.Remoting.Channels.Http.HttpChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="http client" type="System.Runtime.Remoting.Channels.Http.HttpClientChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="http server" type="System.Runtime.Remoting.Channels.Http.HttpServerChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="tcp" type="System.Runtime.Remoting.Channels.Tcp.TcpChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="tcp client" type="System.Runtime.Remoting.Channels.Tcp.TcpClientChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="tcp server" type="System.Runtime.Remoting.Channels.Tcp.TcpServerChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="ipc" type="System.Runtime.Remoting.Channels.Ipc.IpcChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="ipc client" type="System.Runtime.Remoting.Channels.Ipc.IpcClientChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="ipc server" type="System.Runtime.Remoting.Channels.Ipc.IpcServerChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="http" type="System.Runtime.Remoting.Channels.Http.HttpChannel, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="http client" type="System.Runtime.Remoting.Channels.Http.HttpClientChannel, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="http server" type="System.Runtime.Remoting.Channels.Http.HttpServerChannel, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="tcp" type="System.Runtime.Remoting.Channels.Tcp.TcpChannel, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="tcp client" type="System.Runtime.Remoting.Channels.Tcp.TcpClientChannel, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<channel id="tcp server" type="System.Runtime.Remoting.Channels.Tcp.TcpServerChannel, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</channels>
|
||||
<channelSinkProviders>
|
||||
<clientProviders>
|
||||
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</clientProviders>
|
||||
<serverProviders>
|
||||
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<provider id="wsdl" type="System.Runtime.Remoting.MetadataServices.SdlChannelSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<provider id="wsdl" type="System.Runtime.Remoting.MetadataServices.SdlChannelSinkProvider, System.Runtime.Remoting, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</serverProviders>
|
||||
</channelSinkProviders>
|
||||
</system.runtime.remoting>
|
||||
@@ -136,7 +204,7 @@
|
||||
<cryptographySettings>
|
||||
<cryptoNameMapping>
|
||||
<cryptoClasses>
|
||||
<cryptoClass monoMD2="Mono.Security.Cryptography.MD2Managed, Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
|
||||
<cryptoClass monoMD2="Mono.Security.Cryptography.MD2Managed, Mono.Security, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
|
||||
</cryptoClasses>
|
||||
<nameEntry name="MD2" class="monoMD2" />
|
||||
</cryptoNameMapping>
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<configuration>
|
||||
|
||||
<system.web>
|
||||
<authorization>
|
||||
<allow users="*" />
|
||||
</authorization>
|
||||
<httpHandlers>
|
||||
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.master" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.resources" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.skin" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.browser" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.sitemap" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.webinfo" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.resx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.vb" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.csproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.vbproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.licx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
|
||||
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</httpHandlers>
|
||||
<httpModules>
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add name="RoleManager" type="System.Web.Security.RoleManagerModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</httpModules>
|
||||
<authentication mode="Forms">
|
||||
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
|
||||
<credentials passwordFormat="Clear">
|
||||
<!--<user name="gonzalo" password="gonz"/>-->
|
||||
</credentials>
|
||||
</forms>
|
||||
</authentication>
|
||||
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
|
||||
<globalization requestEncoding="utf-8"
|
||||
responseEncoding="utf-8"
|
||||
fileEncoding="utf-8"/>
|
||||
<!--
|
||||
culture="en-US"
|
||||
uiculture="en-US" />
|
||||
-->
|
||||
<sessionState mode="InProc" />
|
||||
<webServices>
|
||||
<protocols>
|
||||
<add name="HttpSoap"/>
|
||||
<add name="HttpPost"/>
|
||||
<add name="HttpGet"/>
|
||||
<add name="Documentation"/>
|
||||
</protocols>
|
||||
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
|
||||
</webServices>
|
||||
<webControls clientScriptsLocation="/web_scripts" />
|
||||
<compilation debug="false" defaultLanguage="c#" explicit="true" strict="false" >
|
||||
<compilers>
|
||||
<compiler language="cs;c#;csharp" extension=".cs" warningLevel="1" compilerOptions=""
|
||||
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
|
||||
warningLevel="1" compilerOptions=""
|
||||
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</compilers>
|
||||
<assemblies>
|
||||
<!--<add assembly="mscorlib" /> -->
|
||||
<add assembly="System" />
|
||||
<add assembly="System.Xml" />
|
||||
<add assembly="System.Configuration" />
|
||||
<add assembly="System.Data" />
|
||||
<add assembly="System.Web" />
|
||||
<add assembly="System.Web.Services" />
|
||||
<add assembly="System.Drawing" />
|
||||
<add assembly="*" /> <!-- Add assemblies in bin directory -->
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<httpRuntime executionTimeout="90"
|
||||
maxRequestLength="4096"
|
||||
useFullyQualifiedRedirectUrl="false"
|
||||
minFreeThreads="8"
|
||||
minLocalRequestFreeThreads="4"
|
||||
appRequestQueueLimit="100" />
|
||||
<clientTarget>
|
||||
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
|
||||
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
|
||||
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
|
||||
<add alias="downlevel" userAgent="Unknown" />
|
||||
</clientTarget>
|
||||
|
||||
<siteMap enabled="false">
|
||||
<providers>
|
||||
<add name="AspNetXmlSiteMapProvider"
|
||||
description="Default site map provider that reads in .sitemap xml files."
|
||||
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
siteMapFile="Web.sitemap" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
</system.web>
|
||||
|
||||
</configuration>
|
||||
@@ -1,261 +0,0 @@
|
||||
|
||||
Exception Handling In the Mono Runtime
|
||||
--------------------------------------
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
There are many types of exceptions which the runtime needs to handle. These
|
||||
are:
|
||||
- exceptions thrown from managed code using the 'throw' or 'rethrow' CIL
|
||||
instructions.
|
||||
- exceptions thrown by some IL instructions like InvalidCastException thrown
|
||||
by the 'castclass' CIL instruction.
|
||||
- exceptions thrown by runtime code
|
||||
- synchronous signals received while in managed code
|
||||
- synchronous signals received while in native code
|
||||
- asynchronous signals
|
||||
|
||||
Since exception handling is very arch dependent, parts of the exception
|
||||
handling code reside in the arch specific exceptions-<ARCH>.c files. The
|
||||
architecture independent parts are in mini-exceptions.c. The different
|
||||
exception types listed above are generated in different parts of the runtime,
|
||||
but ultimately, they all end up in the mono_handle_exception () function in
|
||||
mini-exceptions.c.
|
||||
|
||||
Exceptions throw programmatically from managed code
|
||||
---------------------------------------------------
|
||||
|
||||
These exceptions are thrown from managed code using 'throw' or 'rethrow' CIL
|
||||
instructions. The JIT compiler will translate them to a call to a helper
|
||||
function called 'mono_arch_throw/rethrow_exception'. These helper functions do
|
||||
not exist at compile time, they are created dynamically at run time by the
|
||||
code in the exceptions-<ARCH>.c files. They perform various stack
|
||||
manipulation magic, then call a helper function usually named throw_exception (), which does further processing in C code, then calls mono_handle_exception ()
|
||||
to do the rest.
|
||||
|
||||
Exceptions thrown implicitly from managed code
|
||||
----------------------------------------------
|
||||
|
||||
These exceptions are thrown by some IL instructions when something goes wrong.
|
||||
When the JIT needs to throw such an exception, it emits a forward conditional
|
||||
branch and remembers its position, along with the exception which needs to
|
||||
be emitted. This is usually done in macros named EMIT_COND_SYSTEM_EXCEPTION in
|
||||
the mini-<ARCH>.c files. After the machine code for the method is emitted, the
|
||||
JIT calls the arch dependent mono_arch_emit_exceptions () function which will
|
||||
add the exception throwing code to the end of the method, and patches up the
|
||||
previous forward branches so they will point to this code. This has the
|
||||
advantage that the rarely-executed exception throwing code is kept separate
|
||||
from the method body, leading to better icache performance.
|
||||
The exception throwing code braches to the dynamically generated
|
||||
mono_arch_throw_corlib_exception helper function, which will create the
|
||||
proper exception object, does some stack manipulation, then calls
|
||||
throw_exception ().
|
||||
|
||||
Exceptions thrown by runtime code
|
||||
---------------------------------
|
||||
|
||||
These exceptions are usually thrown by the implementations of InternalCalls
|
||||
(icalls). First an appropriate exception object is created with the help of
|
||||
various helper functions in metadata/exception.c, which has a separate helper
|
||||
function for allocating each kind of exception object used by the runtime code.
|
||||
Then the mono_raise_exception () function is called to actually throw the
|
||||
exception. That function never returns.
|
||||
|
||||
An example:
|
||||
if (something_is_wrong)
|
||||
mono_raise_exception (mono_get_exception_index_out_of_range ());
|
||||
|
||||
mono_raise_exception () simply passes the exception to the JIT side through
|
||||
an API, where it will be received by helper created by mono_arch_throw_exception (). From now on, it is treated as an exception thrown from managed code.
|
||||
|
||||
Synchronous signals
|
||||
-------------------
|
||||
|
||||
For performance reasons, the runtime does not do same checks required by the
|
||||
CLI spec. Instead, it relies on the CPU to do them. The two main checks which
|
||||
are omitted are null-pointer checks, and arithmetic checks. When a null
|
||||
pointer is dereferenced by JITted code, the CPU will notify the kernel through
|
||||
an interrupt, and the kernel will send a SIGSEGV signal to the process. The
|
||||
runtime installs a signal handler for SIGSEGV, which is
|
||||
sigsegv_signal_handler () in mini.c. The signal handler creates the appropriate
|
||||
exception object and calls mono_handle_exception () with it. Arithmetic
|
||||
exceptions like division by zero are handled similarly.
|
||||
|
||||
Synchronous signals in native code
|
||||
----------------------------------
|
||||
|
||||
Receiving a signal such as SIGSEGV while in native code means something very
|
||||
bad has happened. Despite this, the current runtime code treats such signals
|
||||
the same as when they are received while in managed code, ie. it constructs
|
||||
a NullPointerException and attempts to handle it. Note that there are two
|
||||
kinds of native code which can be the source of the signal:
|
||||
- code inside the runtime
|
||||
- code inside a native library loaded by an application, ie. libgtk+
|
||||
|
||||
Stack overflow checking
|
||||
-----------------------
|
||||
|
||||
Stack overflow exceptions need special handling. When a thread overflows its
|
||||
stack, the kernel sends it a normal SIGSEGV signal, but the signal handler
|
||||
tries to execute on the same as the thread leading to a further SIGSEGV which
|
||||
will terminate the thread. A solution is to use an alternative signal stack
|
||||
supported by UNIX operating systems through the sigaltstack (2) system call.
|
||||
When a thread starts up, the runtime will install an altstack using the
|
||||
mono_setup_altstack () function in mini-exceptions.c. When a SIGSEGV is
|
||||
received, the signal handler checks whenever the fault address is near the
|
||||
bottom of the threads normal stack. If it is, a StackOverflowException is
|
||||
created instead of a NullPointerException. This exception is handled like
|
||||
any other exception, with some minor differences.
|
||||
Working sigaltstack support is very much os/kernel/libc dependent, so it is
|
||||
disabled by default.
|
||||
|
||||
Asynchronous signals
|
||||
--------------------
|
||||
|
||||
Async signals are used by the runtime to notify a thread that it needs to
|
||||
change its state somehow. Currently, it is used for implementing
|
||||
thread abort/suspend/resume.
|
||||
|
||||
Handling async signals correctly is a very hard problem, since the receiving
|
||||
thread can be in basically any state upon receipt of the signal. It can
|
||||
execute managed code, native code, it can hold various managed/native locks, or
|
||||
it can be in a process of acquiring them, it can be starting up, shutting down
|
||||
etc. Most of the C APIs used by the runtime are not asynch-signal safe,
|
||||
meaning it is not safe to call them from an async signal handler. In
|
||||
particular, the pthread locking functions are not async-safe, so if a
|
||||
signal handler interrupted code which was in the process of acquiring a lock,
|
||||
and the signal handler tries to acquire a lock, the thread will deadlock.
|
||||
Unfortunately, the current signal handling code does acquire locks, so
|
||||
sometimes it does deadlock.
|
||||
|
||||
When receiving an async signal, the signal handler first tries to determine
|
||||
whenever the thread was executing managed code when it was interrupted. If
|
||||
it did, then it is safe to interrupt it, so a ThreadAbortException is
|
||||
constructed and thrown. If the thread was executing native code, then it is
|
||||
generally not safe to interrupt it. In this case, the runtime sets a flag
|
||||
then returns from the signal handler. That flag is checked every time the
|
||||
runtime returns from native code to managed code, and the exception is thrown
|
||||
then. Also, a platform specific mechanism is used to cause the thread to
|
||||
interrupt any blocking operation it might be doing.
|
||||
|
||||
The async signal handler is in sigusr1_signal_handler () in mini.c, while
|
||||
the logic which determines whenever an exception is safe to be thrown is in
|
||||
mono_thread_request_interruption ().
|
||||
|
||||
Stack unwinding during exception handling
|
||||
-----------------------------------------
|
||||
|
||||
The execution state of a thread during exception handling is stored in an
|
||||
arch-specific structure called MonoContext. This structure contains the values
|
||||
of all the CPU registers relevant during exception handling, which
|
||||
usually means:
|
||||
- IP (instruction pointer)
|
||||
- SP (stack pointer)
|
||||
- FP (frame pointer)
|
||||
- callee saved registers
|
||||
|
||||
Callee saved registers are the registers which are required by any procedure
|
||||
to be saved/restored before/after using them. They are usually defined by
|
||||
each platforms ABI (Application Binary Interface). For example, on x86, they
|
||||
are EBX, ESI and EDI.
|
||||
|
||||
The code which calls mono_handle_exception () is required to construct the
|
||||
initial MonoContext. How this is done depends on the caller. For exceptions
|
||||
thrown from managed code, the mono_arch_throw_exception helper function
|
||||
saves the values of the required registers and passes them to throw_exception (), which will save them in the MonoContext structure. For exceptions thrown from
|
||||
signal handlers, the MonoContext stucture is initialized from the signal info
|
||||
received from the kernel.
|
||||
|
||||
During exception handling, the runtime needs to 'unwind' the stack, i.e.
|
||||
given the state of the thread at a stack frame, construct the state at its
|
||||
callers. Since this is platform specific, it is done by a platform specific
|
||||
function called mono_arch_find_jit_info ().
|
||||
|
||||
Two kinds of stack frames need handling:
|
||||
- Managed frames are easier. The JIT will store some information about each
|
||||
managed method, like which callee-saved registers it uses. Based on this
|
||||
information, mono_arch_find_jit_info () can find the values of the registers
|
||||
on the thread stack, and restore them.
|
||||
- Native frames are problematic, since we have no information about how to
|
||||
unwind through them. Some compilers generate unwind information for code,
|
||||
some don't. Also, there is no general purpose library to obtain and decode
|
||||
this unwind information. So the runtime uses a different solution. When
|
||||
managed code needs to call into native code, it does through a
|
||||
managed->native wrapper function, which is generated by the JIT. This
|
||||
function is responsible for saving the machine state into a per-thread
|
||||
structure called MonoLMF (Last Managed Frame). These LMF structures are
|
||||
stored on the threads stack, and are linked together using one of their
|
||||
fields. When the unwinder encounters a native frame, it simply pops
|
||||
one entry of the LMF 'stack', and uses it to restore the frame state to the
|
||||
moment before control passed to native code. In effect, all successive native
|
||||
frames are skipped together.
|
||||
|
||||
Problems/future work
|
||||
--------------------
|
||||
|
||||
1. Async signal safety
|
||||
----------------------
|
||||
|
||||
The current async signal handling code is not async safe, so it can and does
|
||||
deadlock in practice. It needs to be rewritten to avoid taking locks at least
|
||||
until it can determine that it was interrupting managed code.
|
||||
|
||||
Another problem is the managed stack frame unwinding code. It blindly assumes
|
||||
that if the IP points into a managed frame, then all the callee saved
|
||||
registers + the stack pointer are saved on the stack. This is not true if
|
||||
the thread was interrupted while executing the method prolog/epilog.
|
||||
|
||||
2. Raising exceptions from native code
|
||||
--------------------------------------
|
||||
|
||||
Currently, exceptions are raised by calling mono_raise_exception () in
|
||||
the middle of runtime code. This has two problems:
|
||||
- No cleanup is done, ie. if the caller of the function which throws an
|
||||
exception has taken locks, or allocated memory, that is not cleaned up. For
|
||||
this reason, it is only safe to call mono_raise_exception () 'very close' to
|
||||
managed code, ie. in the icall functions themselves.
|
||||
- To allow mono_raise_exception () to unwind through native code, we need to
|
||||
save the LMF structures which can add a lot of overhead even in the common
|
||||
case when no exception is thrown. So this is not zero-cost exception handling.
|
||||
|
||||
An alternative might be to use a JNI style set-pending-exception API.
|
||||
Runtime code could call mono_set_pending_exception (), then return to its
|
||||
caller with an error indication allowing the caller to clean up. When execution
|
||||
returns to managed code, then managed->native wrapper could check whenever
|
||||
there is a pending exception and throw it if neccesary. Since we already check
|
||||
for pending thread interruption, this would have no overhead, allowing us
|
||||
to drop the LMF saving/restoring code, or significant parts of it.
|
||||
|
||||
3. Signals received while in native code
|
||||
----------------------------------------
|
||||
|
||||
Receiving a SIGSEGV while in native code should be seen as a catastrophic
|
||||
error, and the runtime should abort the process immediately after trying to
|
||||
print some diagnostics. This is how SIGSEGVs are handled in all other
|
||||
production VMs. This is also a requirement for dropping LMF support.
|
||||
|
||||
4. libunwind
|
||||
------------
|
||||
|
||||
There is an OSS project called libunwind which is a standalone stack unwinding
|
||||
library. It is currently in development, but it is used by default by gcc on
|
||||
ia64 for its stack unwinding. The mono runtime also uses it on ia64. It has
|
||||
several advantages in relation to our current unwinding code:
|
||||
- it has a platform independent API, i.e. the same unwinding code can be used
|
||||
on multiple platforms.
|
||||
- it can generate unwind tables which are correct at every instruction, i.e.
|
||||
can be used for unwinding from async signals.
|
||||
- given sufficient unwind info generated by a C compiler, it can unwind through
|
||||
C code.
|
||||
- most of its API is async-safe
|
||||
- it implements the gcc C++ exception handling API, so in theory it can
|
||||
be used to implement mixed-language exception handling (i.e. C++ exception
|
||||
caught in mono, mono exception caught in C++).
|
||||
- it is MIT licensed
|
||||
|
||||
The biggest problem with libuwind is its platform support. ia64 support is
|
||||
complete/well tested, while support for other platforms is missing/incomplete.
|
||||
|
||||
http://www.hpl.hp.com/research/linux/libunwind/
|
||||
|
||||
@@ -62,222 +62,3 @@ Global Register Allocation
|
||||
==========================
|
||||
|
||||
TODO.
|
||||
|
||||
Local Register Allocation
|
||||
=========================
|
||||
|
||||
This section describes the cross-platform local register allocator which is
|
||||
in the file mini-codegen.c.
|
||||
|
||||
The input to the allocator is a basic block which contains linear IL, ie.
|
||||
instructions of the form:
|
||||
|
||||
DEST <- SRC1 OP SRC2
|
||||
|
||||
where DEST, SRC1, and SRC2 are virtual registers (vregs). The job of the
|
||||
allocator is to assign hard or physical registers (hregs) to each virtual
|
||||
registers so the vreg references in the instructions can be replaced with their
|
||||
assigned hreg, allowing machine code to be generated later.
|
||||
|
||||
The allocator needs information about the number and types of arguments of
|
||||
instructions. It takes this information from the machine description files. It
|
||||
also needs arch specific information, like the number and type of the hard
|
||||
registers. It gets this information from arch-specific macros.
|
||||
|
||||
Currently, the vregs and hregs are partitioned into two classes: integer and
|
||||
floating point.
|
||||
|
||||
The allocator consists of two phases: In the first phase, a forward pass is
|
||||
made over the instructions, collecting liveness information for vregs. In the
|
||||
second phase, a backward pass is made over the instructions, assigning
|
||||
registers. This backward mode of operation makes understanding the allocator
|
||||
somewhat difficult to understand, but leads to better code in most cases.
|
||||
|
||||
Allocator state
|
||||
===============
|
||||
|
||||
The state of the allocator is stored in two arrays: iassign and isymbolic.
|
||||
iassign maps vregs to hregs, while isymbolic is the opposite.
|
||||
For a vreg, iassign [vreg] can contain the following values:
|
||||
|
||||
* -1 vreg has no assigned hreg
|
||||
|
||||
* hreg index (>= 0) vreg is assigned to the given hreg. This means
|
||||
later instructions (which we have already
|
||||
processed due to the backward direction) expect
|
||||
the value of vreg to be found in hreg.
|
||||
|
||||
* spill slot index (< -1) vreg is spilled to the given spill slot. This
|
||||
means later instructions expect the value of
|
||||
vreg to be found on the stack in the given
|
||||
spill slot.
|
||||
|
||||
Also, the allocator keeps track of which hregs are free and which are used.
|
||||
This information is stored in a bitmask called ifree_mask.
|
||||
|
||||
There is a similar set of data structures for floating point registers.
|
||||
|
||||
Spilling
|
||||
========
|
||||
|
||||
When an allocator needs a free hreg, but all of them are assigned, it needs to
|
||||
free up one of them. It does this by spilling the contents of the vreg which
|
||||
is currently assigned to the selected hreg. Since later instructions expect
|
||||
the vreg to be found in the selected hreg, the allocator emits a spill-load
|
||||
instruction to load the value from the spill slot into the hreg after the
|
||||
currently processed instruction. When the vreg which is spilled is a
|
||||
destination in an instruction, the allocator will emit a spill-store to store
|
||||
the value into the spill slot.
|
||||
|
||||
Fixed registers
|
||||
===============
|
||||
|
||||
Some architectures, notably x86/amd64 require that the arguments/results of
|
||||
some instructions be assigned to specific hregs. An example is the shift
|
||||
opcodes on x86, where the second argument must be in ECX. The allocator
|
||||
has support for this. It tries to allocate the vreg to the required hreg. If
|
||||
thats not possible, then it will emit compensation code which moves values to
|
||||
the correct registers before/after the instruction.
|
||||
|
||||
Fixed registers are mainly used on x86, but they are useful on more regular
|
||||
architectures on well, for example to model that after a call instruction, the
|
||||
return of the call is in a specific register.
|
||||
|
||||
A special case of fixed registers is two address architectures, like the x86,
|
||||
where the instructions place their results into their first argument. This is
|
||||
modelled in the allocator by allocating SRC1 and DEST to the same hreg.
|
||||
|
||||
Global registers
|
||||
================
|
||||
|
||||
Some variables might already be allocated to hardware registers during the
|
||||
global allocation phase. In this case, SRC1, SRC2 and DEST might already be
|
||||
a hardware register. The allocator needs to do nothing in this case, except
|
||||
when the architecture uses fixed registers, in which case it needs to emit
|
||||
compensation code.
|
||||
|
||||
Register pairs
|
||||
==============
|
||||
|
||||
64 bit arithmetic on 32 bit machines requires instructions whose arguments are
|
||||
not registers, but register pairs. The allocator has support for this, both
|
||||
for freely allocatable register pairs, and for register pairs which are
|
||||
constrained to specific hregs (EDX:EAX on x86).
|
||||
|
||||
Floating point stack
|
||||
====================
|
||||
|
||||
The x86 architecture uses a floating point register stack instead of a set of
|
||||
fp registers. The allocator supports this by keeping track of the height of the
|
||||
fp stack, and spilling/loading values from the stack as neccesary.
|
||||
|
||||
Calls
|
||||
=====
|
||||
|
||||
Calls need special handling for two reasons: first, they will clobber all
|
||||
caller-save registers, meaning their contents will need to be spilled. Also,
|
||||
some architectures pass arguments in registers. The registers used for
|
||||
passing arguments are usually the same as the ones used for local allocation,
|
||||
so the allocator needs to handle them specially. This is done as follows:
|
||||
the MonoInst for the call instruction contains a map mapping vregs which
|
||||
contain the argument values to hregs where the argument needs to be placed,
|
||||
like this (on amd64):
|
||||
|
||||
R33 -> RDI
|
||||
R34 -> RSI
|
||||
...
|
||||
|
||||
When the allocator processes the call instruction, it allocates the vregs
|
||||
in the map to their associated hregs. So the call instruction is processed as
|
||||
if having a variable number of arguments which fixed register assignments.
|
||||
|
||||
An example:
|
||||
|
||||
R33 <- 1
|
||||
R34 <- 2
|
||||
call
|
||||
|
||||
When the call instruction is processed, R33 is assigned to RDI, and R34 is
|
||||
assigned to RSI. Later, when the two assignment instructions are processed,
|
||||
R33 and R34 are already assigned to a hreg, so they are replaced with the
|
||||
associated hreg leading to the following final code:
|
||||
|
||||
RDI <- 1
|
||||
RSI <- 1
|
||||
call
|
||||
|
||||
Machine description files
|
||||
=========================
|
||||
|
||||
A typical entry in the machine description files looks like this:
|
||||
|
||||
shl: dest:i src1:i src2:s clob:1 len:2
|
||||
|
||||
The allocator is only interested in the dest,src1,src2 and clob fields.
|
||||
It understands the following values for the dest, src1, src2 fields:
|
||||
|
||||
i - integer register
|
||||
f - fp register
|
||||
b - base register (same as i, but the instruction does not modify the reg)
|
||||
m - fp register, even if an fp stack is used (no fp stack tracking)
|
||||
|
||||
It understands the following values for the clob field:
|
||||
|
||||
1 - sreg1 needs to be the same as dreg
|
||||
c - instruction clobbers the caller-save registers
|
||||
|
||||
Beside these values, an architecture can define additional values (like the 's'
|
||||
in the example). The allocator depends on a set of arch-specific macros to
|
||||
convert these values to information it needs during allocation.
|
||||
|
||||
Arch specific macros
|
||||
====================
|
||||
|
||||
These macros usually receive a value from the machine description file (like
|
||||
the 's' in the example). The examples below are for x86.
|
||||
|
||||
/*
|
||||
* A bitmask selecting the caller-save registers (these are used for local
|
||||
* allocation).
|
||||
*/
|
||||
#define MONO_ARCH_CALLEE_REGS X86_CALLEE_REGS
|
||||
|
||||
/*
|
||||
* A bitmask selecting the callee-saved registers (these are usually used for
|
||||
* global allocation).
|
||||
*/
|
||||
#define MONO_ARCH_CALLEE_SAVED_REGS X86_CALLER_REGS
|
||||
|
||||
/* Same for the floating point registers */
|
||||
#define MONO_ARCH_CALLEE_FREGS 0
|
||||
#define MONO_ARCH_CALLEE_SAVED_FREGS 0
|
||||
|
||||
/* Whenever the target uses a floating point stack */
|
||||
#define MONO_ARCH_USE_FPSTACK TRUE
|
||||
|
||||
/* The size of the floating point stack */
|
||||
#define MONO_ARCH_FPSTACK_SIZE 6
|
||||
|
||||
/*
|
||||
* Given a descriptor value from the machine description file, return the fixed
|
||||
* hard reg corresponding to that value.
|
||||
*/
|
||||
#define MONO_ARCH_INST_FIXED_REG(desc) ((desc == 's') ? X86_ECX : ((desc == 'a') ? X86_EAX : ((desc == 'd') ? X86_EDX : ((desc == 'y') ? X86_EAX : ((desc == 'l') ? X86_EAX : -1)))))
|
||||
|
||||
/*
|
||||
* A bitmask selecting the hregs which can be used for allocating sreg2 for
|
||||
* a given instruction.
|
||||
*/
|
||||
#define MONO_ARCH_INST_SREG2_MASK(ins) (((ins [MONO_INST_CLOB] == 'a') || (ins [MONO_INST_CLOB] == 'd')) ? (1 << X86_EDX) : 0)
|
||||
|
||||
/*
|
||||
* Given a descriptor value, return whenever it denotes a register pair.
|
||||
*/
|
||||
#define MONO_ARCH_INST_IS_REGPAIR(desc) (desc == 'l' || desc == 'L')
|
||||
|
||||
/*
|
||||
* Given a descriptor value, and the first register of a regpair, return a
|
||||
* bitmask selecting the hregs which can be used for allocating the second
|
||||
* register of the regpair.
|
||||
*/
|
||||
#define MONO_ARCH_INST_REGPAIR_REG2(desc,hreg1) (desc == 'l' ? X86_EDX : -1)
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
Name: Standard libraries in a .NET setup
|
||||
Description: References all the standard .NET libraries for compilation
|
||||
Version: @VERSION@
|
||||
Libs: -r:Accessibility.dll -r:cscompmgd.dll -r:Microsoft.JScript.dll -r:Microsoft.VisualBasic.dll -r:Microsoft.VisualC.dll -r:Microsoft.Vsa.dll -r:System.Configuration.Install.dll -r:System.Data.dll -r:System.Data.OracleClient.dll -r:System.Design.dll -r:System.DirectoryServices.dll -r:System.dll -r:System.Drawing.Design.dll -r:System.Drawing.dll -r:System.EnterpriseServices.dll -r:System.Management.dll -r:System.Messaging.dll -r:System.Runtime.Remoting.dll -r:System.Runtime.Serialization.Formatters.Soap.dll -r:System.Security.dll -r:System.ServiceProcess.dll -r:System.Web.dll -r:System.Web.Services.dll -r:System.Windows.Forms.dll -r:System.Xml.dll
|
||||
@@ -1,4 +0,0 @@
|
||||
Originally written by Hans Boehm, with some platform-dependent code
|
||||
imported from the Boehm-Demers-Weiser GC, where it was contributed
|
||||
by many others.
|
||||
|
||||
@@ -1,340 +0,0 @@
|
||||
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.
|
||||
@@ -1,78 +0,0 @@
|
||||
2005-03-21 Hans Boehm <[email protected]>
|
||||
Fix various acquire_release_volatile.h files to reflect the fact
|
||||
that both icc and gcc seem to reorder ordinary memory accesses around
|
||||
volatile accesses early in the compilation. Modify the acquire
|
||||
release test to catch this problem (with high probablity, and only on
|
||||
a multiprocessor).
|
||||
|
||||
2005-03 Hans Boehm <[email protected]>
|
||||
Fixes for recently introduced bugs. Update x86 and x86-64 assembly
|
||||
syntax to deal with complaints by some recent gcc versions.
|
||||
|
||||
2005-02 Hans Boehm <[email protected]>
|
||||
Added libatomic_ops_gpl library with support for mostly
|
||||
lock-free stack and malloc().
|
||||
|
||||
2005-01 Ian Wienand <[email protected]>, Al Stone <[email protected]>,
|
||||
Hans Boehm <[email protected]>
|
||||
Use autoconf, automake, starting with code from Debian package.
|
||||
Don't use libtool.
|
||||
|
||||
2005-01 Hans Boehm <[email protected]>
|
||||
* test_and_set_t_is_ao_t.h, test_and_set_t_is_char.h, others:
|
||||
Change most platforms to use byte-wide test-and-set locations.
|
||||
|
||||
2005-01 Hans Boehm <[email protected]>
|
||||
* ao_t_is_int.h: Add to trivially support int-wide operations
|
||||
on platforms with int-sized pointers.
|
||||
|
||||
2004-12 Hans Boehm <[email protected]>
|
||||
* gcc/powerpc.h: First serious attempt to support PowerPC (with
|
||||
help from Maged Michael and others).
|
||||
|
||||
2004-12 Hans Boehm <[email protected]>
|
||||
* sunc/sparc.[hS]: Added minimal supprt for the Sun SPARC compiler.
|
||||
* atomic_ops_sysdeps.S: Add support for platforms that require
|
||||
out-of-line assmebly code.
|
||||
|
||||
2004-10 Hans Boehm <[email protected]>
|
||||
More work on char, short, int sized data. Add both
|
||||
compare_double_and_swap_double and compare_and_swap_double.
|
||||
Typically each platform will provide at most one of these.
|
||||
|
||||
2004-07-02 Ranko Zivojnovic
|
||||
Replace both instances of AO_HAVE_NOP_FULL with AO_HAVE_nop_full.
|
||||
|
||||
2004-06 Hans Boehm <[email protected]>
|
||||
Start to add atomic_ops primitives for different sized data.
|
||||
|
||||
2003-12-18 Hans Boehm <[email protected]>
|
||||
* atomic_ops/sysdeps/acquire_release_volatile.h, atomic_ops.h:
|
||||
Fix support for ecc on IA64. Remove compiler_barrier workaround
|
||||
for gcc 3.4 and later.
|
||||
|
||||
2003-12-17 Hans Boehm <[email protected]>
|
||||
* atomic_ops/sysdeps/hpc/{ia64.h,hppa.h},
|
||||
atomic_ops/sysdeps/msftc/x86.h, Makefile, Makefile.atomic_ops,
|
||||
Makefile.atomic_ops.msft, atomic_ops.h: Add initial support
|
||||
for atomic_ops for VC++/Windows/X86 and HP/UX with the HP
|
||||
compiler on PA_RISC and IA64.
|
||||
|
||||
2003-12-09 Hans Boehm <[email protected]>
|
||||
|
||||
* many: Install under "atomic_ops" instead of "ao".
|
||||
Change atomic_ops include file structure. Auxiliary include
|
||||
files are all under include/atomic_ops.
|
||||
Fix (hopefully) "make dist" in atomic_ops distribution.
|
||||
Renamed various types to end in _t, though the old versions
|
||||
are still defined for backward compatibility.
|
||||
|
||||
2003-12-08 Carlos O'Donell <[email protected]>
|
||||
|
||||
* ao_sysdeps/gcc/hppa.h: Define AO_CLEAR macro. Change
|
||||
AO_pa_clearable_loc type. Add __ldcw, and __ldcw_align
|
||||
helper macros. AO_test_and_set_full uses helper macros.
|
||||
|
||||
|
||||
Started sometime after version 0.4 release. Currently the format is
|
||||
informal. Eventually should become more GNU-like.
|
||||
@@ -1,14 +0,0 @@
|
||||
The configuration and build scripts for this package were generated by
|
||||
automake/autoconf. "configure --prefix=<install dir>; make; make install"
|
||||
in this directory should work.
|
||||
|
||||
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.
|
||||
@@ -1,3 +0,0 @@
|
||||
SUBDIRS = src doc tests
|
||||
|
||||
#distclean-local:
|
||||
@@ -1,563 +0,0 @@
|
||||
# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
|
||||
install-sh missing mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEED_ASM_FALSE = @NEED_ASM_FALSE@
|
||||
NEED_ASM_TRUE = @NEED_ASM_TRUE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PICFLAG = @PICFLAG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
SUBDIRS = src doc tests
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-recursive ctags \
|
||||
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
|
||||
dist-tarZ dist-zip distcheck distclean distclean-generic \
|
||||
distclean-recursive distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
#distclean-local:
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
This package provides semi-portable access to hardware provided
|
||||
atomic memory operations. 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
|
||||
ia 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.
|
||||
Vendored
-1076
File diff suppressed because it is too large.
Load diff
@@ -1,142 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2004-10-12.08
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <[email protected]>.
|
||||
#
|
||||
# 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, 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.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <[email protected]> or send patches to
|
||||
# <[email protected]>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <[email protected]>.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
Vendored
-1441
File diff suppressed because it is too large.
Load diff
Vendored
-1552
File diff suppressed because it is too large.
Load diff
Vendored
-5609
File diff suppressed because it is too large.
Load diff
@@ -1,66 +0,0 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_INIT([libatomic_ops],[1.0])
|
||||
AC_CANONICAL_TARGET([])
|
||||
AC_CONFIG_SRCDIR(src/atomic_ops.c)
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AM_CONFIG_HEADER(src/config.h)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AM_PROG_AS
|
||||
|
||||
# Checks for functions.
|
||||
AC_FUNC_MMAP
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
# AC_CHECK_HEADERS([ ])
|
||||
|
||||
# Determine PIC flag, adjust default CFLAGS
|
||||
need_asm=false
|
||||
PICFLAG=
|
||||
AC_MSG_CHECKING(Determining PIC compiler flag)
|
||||
if test "$GCC" = yes; then
|
||||
AC_MSG_RESULT(-fPIC)
|
||||
PICFLAG=-fPIC
|
||||
else
|
||||
case "$host" in
|
||||
*-*-hpux*)
|
||||
AC_MSG_RESULT("+Z")
|
||||
PICFLAG="+Z"
|
||||
if test "$GCC" != yes; then
|
||||
CFLAGS="$CFLAGS +O2 -mt"
|
||||
fi
|
||||
;;
|
||||
*-*-solaris*)
|
||||
AC_MSG_RESULT(-Kpic)
|
||||
PICFLAG=-Kpic
|
||||
if test "$GCC" != yes; then
|
||||
CFLAGS="$CFLAGS -O"
|
||||
need_asm=true
|
||||
fi
|
||||
;;
|
||||
*-*-linux*)
|
||||
AC_MSG_RESULT(-fPIC)
|
||||
PICFLAG=-fPIC
|
||||
# Any Linux compiler had better be gcc compatible.
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT("<none>")
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
CFLAGS="$CFLAGS -DNDEBUG"
|
||||
|
||||
AC_SUBST(PICFLAG)
|
||||
AC_SUBST(DEFS)
|
||||
|
||||
AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue)
|
||||
|
||||
AC_CONFIG_FILES([Makefile src/Makefile src/atomic_ops/Makefile src/atomic_ops/sysdeps/Makefile doc/Makefile tests/Makefile])
|
||||
AC_CONFIG_COMMANDS([default],[[]],[[PICFLAG=${PICFLAG}
|
||||
CC=${CC}
|
||||
DEFS=${DEFS}]])
|
||||
AC_OUTPUT
|
||||
@@ -1,436 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <[email protected]>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
|
||||
base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
tmpdepfile1="$base.o.d"
|
||||
tmpdepfile2="$base.d"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*) # this is libtool, let us make it quiet
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case "$arg" in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
# X makedepend
|
||||
(
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in no)
|
||||
set ""; shift
|
||||
cleared=yes
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,340 +0,0 @@
|
||||
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.
|
||||
@@ -1,64 +0,0 @@
|
||||
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.
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# installed documentation
|
||||
#
|
||||
dist_pkgdata_DATA=COPYING LICENSING.txt README.txt COPYING README_stack.txt README_malloc.txt README_win32.txt
|
||||
@@ -1,329 +0,0 @@
|
||||
# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in COPYING
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(pkgdatadir)"
|
||||
dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(dist_pkgdata_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEED_ASM_FALSE = @NEED_ASM_FALSE@
|
||||
NEED_ASM_TRUE = @NEED_ASM_TRUE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PICFLAG = @PICFLAG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
|
||||
# installed documentation
|
||||
#
|
||||
dist_pkgdata_DATA = COPYING LICENSING.txt README.txt COPYING README_stack.txt README_malloc.txt README_win32.txt
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
|
||||
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
|
||||
$(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-dist_pkgdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkgdatadir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_pkgdataDATA
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_pkgdataDATA uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-dist_pkgdataDATA install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-dist_pkgdataDATA uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1,226 +0,0 @@
|
||||
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(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 or(volatile AO_t *addr, AO_t incr)
|
||||
Atomically or incr 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_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 the two values AO_TS_SET and
|
||||
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 repsect 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 memops.
|
||||
_release_write: Ordered with respect to earlier writes. This is
|
||||
normally implemented as either a _write or _release
|
||||
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.
|
||||
_release_read: Ordered with respect to earlier reads. Useful for
|
||||
implementing read locks. Can be implemented as _release,
|
||||
but not as _read, since _read groups the current operation
|
||||
with the earlier ones.
|
||||
|
||||
We assume that if a store is data-dependent on an 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:
|
||||
|
||||
We expect the list of memory barrier types to remain more or less fixed.
|
||||
However, it is likely that the list of underlying atomic operations will
|
||||
grow. It would also be useful to support double-wide and narrower operations
|
||||
when available.
|
||||
|
||||
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.
|
||||
|
||||
Windows:
|
||||
Currently AO_REQUIRE_CAS is not supported.
|
||||
|
||||
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.) Currently only X86(32 bit) is supported for
|
||||
Windows.
|
||||
|
||||
Gcc on x86:
|
||||
Define AO_USE_PENTIUM4_INSTRS to use the Pentium 4 mfence instruction.
|
||||
Currently this is appears to be of marginal benefit.
|
||||
@@ -1,57 +0,0 @@
|
||||
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.
|
||||
|
||||
Perfomance 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 scalablity, 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);
|
||||
@@ -1,78 +0,0 @@
|
||||
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-hndler 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, or
|
||||
http://www.hpl.hp.com/techreports/2004/HPL-2004-105.html
|
||||
(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.
|
||||
@@ -1,28 +0,0 @@
|
||||
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. 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.
|
||||
|
||||
Note that the library is covered by the GNU General Public License, while
|
||||
the top 2 of these pieces allow use in proprietary code.
|
||||
@@ -1,269 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
#
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# 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
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
@@ -1,336 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <[email protected]>, 1996.
|
||||
|
||||
# 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, 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.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar ${1+"$@"} && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar ${1+"$@"} && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" ${1+"$@"} && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" ${1+"$@"} && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,40 +0,0 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <[email protected]>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
||||
@@ -1,16 +0,0 @@
|
||||
SUBDIRS=atomic_ops
|
||||
|
||||
AM_CFLAGS=@PICFLAG@
|
||||
|
||||
include_HEADERS=atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
|
||||
lib_LIBRARIES = libatomic_ops.a libatomic_ops_gpl.a
|
||||
if NEED_ASM
|
||||
libatomic_ops_a_SOURCES = atomic_ops.c atomic_ops_sysdeps.S
|
||||
else
|
||||
libatomic_ops_a_SOURCES = atomic_ops.c
|
||||
endif
|
||||
|
||||
libatomic_ops_gpl_a_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c
|
||||
|
||||
EXTRA_DIST=Makefile.msft
|
||||
|
||||
@@ -1,597 +0,0 @@
|
||||
# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
SOURCES = $(libatomic_ops_a_SOURCES) $(libatomic_ops_gpl_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = src
|
||||
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
|
||||
libLIBRARIES_INSTALL = $(INSTALL_DATA)
|
||||
LIBRARIES = $(lib_LIBRARIES)
|
||||
AR = ar
|
||||
ARFLAGS = cru
|
||||
libatomic_ops_a_AR = $(AR) $(ARFLAGS)
|
||||
libatomic_ops_a_LIBADD =
|
||||
am__libatomic_ops_a_SOURCES_DIST = atomic_ops.c atomic_ops_sysdeps.S
|
||||
@NEED_ASM_FALSE@am_libatomic_ops_a_OBJECTS = atomic_ops.$(OBJEXT)
|
||||
@NEED_ASM_TRUE@am_libatomic_ops_a_OBJECTS = atomic_ops.$(OBJEXT) \
|
||||
@NEED_ASM_TRUE@ atomic_ops_sysdeps.$(OBJEXT)
|
||||
libatomic_ops_a_OBJECTS = $(am_libatomic_ops_a_OBJECTS)
|
||||
libatomic_ops_gpl_a_AR = $(AR) $(ARFLAGS)
|
||||
libatomic_ops_gpl_a_LIBADD =
|
||||
am_libatomic_ops_gpl_a_OBJECTS = atomic_ops_stack.$(OBJEXT) \
|
||||
atomic_ops_malloc.$(OBJEXT)
|
||||
libatomic_ops_gpl_a_OBJECTS = $(am_libatomic_ops_gpl_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libatomic_ops_a_SOURCES) $(libatomic_ops_gpl_a_SOURCES)
|
||||
DIST_SOURCES = $(am__libatomic_ops_a_SOURCES_DIST) \
|
||||
$(libatomic_ops_gpl_a_SOURCES)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEED_ASM_FALSE = @NEED_ASM_FALSE@
|
||||
NEED_ASM_TRUE = @NEED_ASM_TRUE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PICFLAG = @PICFLAG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
SUBDIRS = atomic_ops
|
||||
AM_CFLAGS = @PICFLAG@
|
||||
include_HEADERS = atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
|
||||
lib_LIBRARIES = libatomic_ops.a libatomic_ops_gpl.a
|
||||
@NEED_ASM_FALSE@libatomic_ops_a_SOURCES = atomic_ops.c
|
||||
@NEED_ASM_TRUE@libatomic_ops_a_SOURCES = atomic_ops.c atomic_ops_sysdeps.S
|
||||
libatomic_ops_gpl_a_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c
|
||||
EXTRA_DIST = Makefile.msft
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status src/config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
install-libLIBRARIES: $(lib_LIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLIBRARIES:
|
||||
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
|
||||
libatomic_ops.a: $(libatomic_ops_a_OBJECTS) $(libatomic_ops_a_DEPENDENCIES)
|
||||
-rm -f libatomic_ops.a
|
||||
$(libatomic_ops_a_AR) libatomic_ops.a $(libatomic_ops_a_OBJECTS) $(libatomic_ops_a_LIBADD)
|
||||
$(RANLIB) libatomic_ops.a
|
||||
libatomic_ops_gpl.a: $(libatomic_ops_gpl_a_OBJECTS) $(libatomic_ops_gpl_a_DEPENDENCIES)
|
||||
-rm -f libatomic_ops_gpl.a
|
||||
$(libatomic_ops_gpl_a_AR) libatomic_ops_gpl.a $(libatomic_ops_gpl_a_OBJECTS) $(libatomic_ops_gpl_a_LIBADD)
|
||||
$(RANLIB) libatomic_ops_gpl.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_malloc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_stack.Po@am__quote@
|
||||
|
||||
.S.o:
|
||||
$(CCASCOMPILE) -c $<
|
||||
|
||||
.S.obj:
|
||||
$(CCASCOMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
uninstall-info-am:
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(LIBRARIES) $(HEADERS) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
|
||||
install-exec-am: install-libLIBRARIES
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-includeHEADERS uninstall-info-am \
|
||||
uninstall-libLIBRARIES
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libLIBRARIES clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-recursive distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-libLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-includeHEADERS \
|
||||
uninstall-info-am uninstall-libLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1,45 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2003-2005 Hewlett-Packard Developlment Company, L.P.
|
||||
#
|
||||
# The really trivial win32/VC++ Makefile. Note that atomic_ops.c isn't useful.
|
||||
# And we rely on a pre-built test_atomic_include.h and generalize-small.h,
|
||||
# since we can't rely on sed.
|
||||
# Win32 clients only need to include the header files.
|
||||
# To install, copy atomic_ops.h and the atomic_ops/... tree to your favorite
|
||||
# include directory.
|
||||
|
||||
#MY_CPU=X86
|
||||
#CPU=$(MY_CPU)
|
||||
#!include <ntwin32.mak>
|
||||
|
||||
LIB_OBJS=atomic_ops_stack.obj atomic_ops_malloc.obj
|
||||
|
||||
all: check
|
||||
|
||||
atomic_ops_stack.obj:
|
||||
cl -O2 -c -DAO_ASSUME_WINDOWS98 atomic_ops_stack.c
|
||||
|
||||
atomic_ops_malloc.obj:
|
||||
cl -O2 -c -DAO_ASSUME_WINDOWS98 atomic_ops_malloc.c
|
||||
|
||||
test_atomic: ..\tests\test_atomic.c ..\tests\test_atomic_include.h
|
||||
cl -O2 -I. -DAO_ASSUME_WINDOWS98 ..\tests\test_atomic.c -o test_atomic
|
||||
|
||||
test_atomic_w95: ..\tests\test_atomic.c ..\tests\test_atomic_include.h
|
||||
cl -O2 -I. ..\tests\test_atomic.c -o test_atomic_w95
|
||||
|
||||
test_malloc: ..\tests\test_malloc.c ..\tests\test_atomic_include.h \
|
||||
libatomic_ops_gpl.lib
|
||||
cl -O2 -DAO_ASSUME_WINDOWS98 -I. ..\tests\test_malloc.c -o test_malloc libatomic_ops_gpl.lib
|
||||
|
||||
libatomic_ops_gpl.lib: $(LIB_OBJS)
|
||||
lib /MACHINE:i386 /out:libatomic_ops_gpl.lib $(LIB_OBJS)
|
||||
|
||||
check: test_atomic test_atomic_w95 test_malloc
|
||||
echo The following will print lots of \"Missing ...\" messages.
|
||||
test_atomic_w95
|
||||
echo The following will print some \"Missing ...\" messages.
|
||||
test_atomic
|
||||
test_malloc
|
||||
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Initialized data and out-of-line functions to support atomic_ops.h
|
||||
* go here. Currently this is needed only for pthread-based atomics
|
||||
* emulation, or for compare-and-swap emulation.
|
||||
* Pthreads emulation isn't useful on a native Windows platform, and
|
||||
* cas emulation is not needed. Thus we skip this on Windows.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__BORLANDC__)
|
||||
|
||||
#undef AO_REQUIRE_CAS
|
||||
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#ifdef _HPUX_SOURCE
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# include <sys/select.h>
|
||||
#endif
|
||||
#include "atomic_ops.h" /* Without cas emulation! */
|
||||
|
||||
#ifndef AO_HAVE_double_t
|
||||
# include "atomic_ops/sysdeps/standard_ao_double_t.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Lock for pthreads-based implementation.
|
||||
*/
|
||||
|
||||
pthread_mutex_t AO_pt_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/*
|
||||
* Out of line compare-and-swap emulation based on test and set.
|
||||
*
|
||||
* We use a small table of locks for different compare_and_swap locations.
|
||||
* Before we update perform a compare-and-swap, we grap the corresponding
|
||||
* lock. Different locations may hash to the same lock, but since we
|
||||
* never acquire more than one lock at a time, this can't deadlock.
|
||||
* We explicitly disable signals while we perform this operation.
|
||||
*
|
||||
* FIXME: We should probably also suppport emulation based on Lamport
|
||||
* locks, since we may not have test_and_set either.
|
||||
*/
|
||||
#define AO_HASH_SIZE 16
|
||||
|
||||
#define AO_HASH(x) (((unsigned long)(x) >> 12) & (AO_HASH_SIZE-1))
|
||||
|
||||
AO_TS_t AO_locks[AO_HASH_SIZE] = {
|
||||
AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|
||||
AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|
||||
AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|
||||
AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|
||||
AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|
||||
AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|
||||
AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|
||||
AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|
||||
};
|
||||
|
||||
static AO_T dummy = 1;
|
||||
|
||||
/* Spin for 2**n units. */
|
||||
void AO_spin(int n)
|
||||
{
|
||||
int i;
|
||||
AO_T j = AO_load(&dummy);
|
||||
|
||||
for (i = 0; i < (2 << n); ++i)
|
||||
{
|
||||
j *= 5;
|
||||
j -= 4;
|
||||
}
|
||||
AO_store(&dummy, j);
|
||||
}
|
||||
|
||||
void AO_pause(int n)
|
||||
{
|
||||
if (n < 12)
|
||||
AO_spin(n);
|
||||
else
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
/* Short async-signal-safe sleep. */
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = (n > 28? 100000 : (1 << (n - 12)));
|
||||
select(0, 0, 0, 0, &tv);
|
||||
}
|
||||
}
|
||||
|
||||
static void lock_ool(volatile AO_TS_t *l)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (AO_test_and_set_acquire(l) == AO_TS_SET)
|
||||
AO_pause(++i);
|
||||
}
|
||||
|
||||
AO_INLINE void lock(volatile AO_TS_t *l)
|
||||
{
|
||||
if (AO_test_and_set_acquire(l) == AO_TS_SET)
|
||||
lock_ool(l);
|
||||
}
|
||||
|
||||
AO_INLINE void unlock(volatile AO_TS_t *l)
|
||||
{
|
||||
AO_CLEAR(l);
|
||||
}
|
||||
|
||||
static sigset_t all_sigs;
|
||||
|
||||
static volatile AO_t initialized = 0;
|
||||
|
||||
static volatile AO_TS_t init_lock = AO_TS_INITIALIZER;
|
||||
|
||||
int AO_compare_and_swap_emulation(volatile AO_t *addr, AO_t old,
|
||||
AO_t new_val)
|
||||
{
|
||||
AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|
||||
sigset_t old_sigs;
|
||||
int result;
|
||||
|
||||
if (!AO_load_acquire(&initialized))
|
||||
{
|
||||
lock(&init_lock);
|
||||
if (!initialized) sigfillset(&all_sigs);
|
||||
unlock(&init_lock);
|
||||
AO_store_release(&initialized, 1);
|
||||
}
|
||||
sigprocmask(SIG_BLOCK, &all_sigs, &old_sigs);
|
||||
/* Neither sigprocmask nor pthread_sigmask is 100% */
|
||||
/* guaranteed to work here. Sigprocmask is not */
|
||||
/* guaranteed be thread safe, and pthread_sigmask */
|
||||
/* is not async-signal-safe. Under linuxthreads, */
|
||||
/* sigprocmask may block some pthreads-internal */
|
||||
/* signals. So long as we do that for short periods, */
|
||||
/* we should be OK. */
|
||||
lock(my_lock);
|
||||
if (*addr == old)
|
||||
{
|
||||
*addr = new_val;
|
||||
result = 1;
|
||||
}
|
||||
else
|
||||
result = 0;
|
||||
unlock(my_lock);
|
||||
sigprocmask(SIG_SETMASK, &old_sigs, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
|
||||
AO_t old_val1, AO_t old_val2,
|
||||
AO_t new_val1, AO_t new_val2)
|
||||
{
|
||||
AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|
||||
sigset_t old_sigs;
|
||||
int result;
|
||||
|
||||
if (!AO_load_acquire(&initialized))
|
||||
{
|
||||
lock(&init_lock);
|
||||
if (!initialized) sigfillset(&all_sigs);
|
||||
unlock(&init_lock);
|
||||
AO_store_release(&initialized, 1);
|
||||
}
|
||||
sigprocmask(SIG_BLOCK, &all_sigs, &old_sigs);
|
||||
/* Neither sigprocmask nor pthread_sigmask is 100% */
|
||||
/* guaranteed to work here. Sigprocmask is not */
|
||||
/* guaranteed be thread safe, and pthread_sigmask */
|
||||
/* is not async-signal-safe. Under linuxthreads, */
|
||||
/* sigprocmask may block some pthreads-internal */
|
||||
/* signals. So long as we do that for short periods, */
|
||||
/* we should be OK. */
|
||||
lock(my_lock);
|
||||
if (addr -> AO_val1 == old_val1 && addr -> AO_val2 == old_val2)
|
||||
{
|
||||
addr -> AO_val1 = new_val1;
|
||||
addr -> AO_val2 = new_val2;
|
||||
result = 1;
|
||||
}
|
||||
else
|
||||
result = 0;
|
||||
unlock(my_lock);
|
||||
sigprocmask(SIG_SETMASK, &old_sigs, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
void AO_store_full_emulation(volatile AO_t *addr, AO_t val)
|
||||
{
|
||||
AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|
||||
lock(my_lock);
|
||||
*addr = val;
|
||||
unlock(my_lock);
|
||||
}
|
||||
|
||||
#else /* Non-posix platform */
|
||||
|
||||
int AO_non_posix_implementation_is_entirely_in_headers;
|
||||
|
||||
#endif
|
||||
@@ -1,288 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ATOMIC_OPS_H
|
||||
|
||||
#define ATOMIC_OPS_H
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
/* We define various atomic operations on memory in a */
|
||||
/* machine-specific way. Unfortunately, this is complicated */
|
||||
/* by the fact that these may or may not be combined with */
|
||||
/* various memory barriers. Thus the actual operations we */
|
||||
/* define have the form AO_<atomic-op>_<barrier>, for all */
|
||||
/* plausible combinations of <atomic-op> and <barrier>. */
|
||||
/* This of course results in a mild combinatorial explosion. */
|
||||
/* To deal with it, we try to generate derived */
|
||||
/* definitions for as many of the combinations as we can, as */
|
||||
/* automatically as possible. */
|
||||
/* */
|
||||
/* Our assumption throughout is that the programmer will */
|
||||
/* specify the least demanding operation and memory barrier */
|
||||
/* that will guarantee correctness for the implementation. */
|
||||
/* Our job is to find the least expensive way to implement it */
|
||||
/* on the applicable hardware. In many cases that will */
|
||||
/* involve, for example, a stronger memory barrier, or a */
|
||||
/* combination of hardware primitives. */
|
||||
/* */
|
||||
/* Conventions: */
|
||||
/* "plain" atomic operations are not guaranteed to include */
|
||||
/* a barrier. The suffix in the name specifies the barrier */
|
||||
/* type. Suffixes are: */
|
||||
/* _release: Earlier operations may not be delayed past it. */
|
||||
/* _acquire: Later operations may not move ahead of it. */
|
||||
/* _read: Subsequent reads must follow this operation and */
|
||||
/* preceding reads. */
|
||||
/* _write: Earlier writes precede both this operation and */
|
||||
/* later writes. */
|
||||
/* _full: Ordered with respect to both earlier and later memops.*/
|
||||
/* _release_write: Ordered with respect to earlier writes. */
|
||||
/* _acquire_read: Ordered with repsect to later reads. */
|
||||
/* */
|
||||
/* Currently we try to define the following atomic memory */
|
||||
/* operations, in combination with the above barriers: */
|
||||
/* AO_nop */
|
||||
/* AO_load */
|
||||
/* AO_store */
|
||||
/* AO_test_and_set (binary) */
|
||||
/* AO_fetch_and_add */
|
||||
/* AO_fetch_and_add1 */
|
||||
/* AO_fetch_and_sub1 */
|
||||
/* AO_or */
|
||||
/* AO_compare_and_swap */
|
||||
/* */
|
||||
/* Note that atomicity guarantees are valid only if both */
|
||||
/* readers and writers use AO_ operations to access the */
|
||||
/* shared value, while ordering constraints are intended to */
|
||||
/* apply all memory operations. If a location can potentially */
|
||||
/* be accessed simultaneously from multiple threads, and one of */
|
||||
/* those accesses may be a write access, then all such */
|
||||
/* accesses to that location should be through AO_ primitives. */
|
||||
/* However if AO_ operations enforce sufficient ordering to */
|
||||
/* ensure that a location x cannot be accessed concurrently, */
|
||||
/* or can only be read concurrently, then x can be accessed */
|
||||
/* via ordinary references and assignments. */
|
||||
/* */
|
||||
/* Compare_and_exchange takes an address and an expected old */
|
||||
/* value and a new value, and returns an int. Nonzero */
|
||||
/* indicates that it succeeded. */
|
||||
/* Test_and_set takes an address, atomically replaces it by */
|
||||
/* AO_TS_SET, and returns the prior value. */
|
||||
/* An AO_TS_t clear location can be reset with the */
|
||||
/* AO_CLEAR macro, which normally uses AO_store_release. */
|
||||
/* AO_fetch_and_add takes an address and an AO_t increment */
|
||||
/* value. The AO_fetch_and_add1 and AO_fetch_and_sub1 variants */
|
||||
/* are provided, since they allow faster implementations on */
|
||||
/* some hardware. AO_or atomically ors an AO_t value into a */
|
||||
/* memory location, but does not provide access to the original.*/
|
||||
/* */
|
||||
/* We expect this list to grow slowly over time. */
|
||||
/* */
|
||||
/* Note that AO_nop_full is a full memory barrier. */
|
||||
/* */
|
||||
/* Note that if some data is initialized with */
|
||||
/* data.x = ...; data.y = ...; ... */
|
||||
/* AO_store_release_write(&data_is_initialized, 1) */
|
||||
/* then data is guaranteed to be initialized after the test */
|
||||
/* if (AO_load_release_read(&data_is_initialized)) ... */
|
||||
/* succeeds. Furthermore, this should generate near-optimal */
|
||||
/* code on all common platforms. */
|
||||
/* */
|
||||
/* All operations operate on unsigned AO_t, which */
|
||||
/* is the natural word size, and usually unsigned long. */
|
||||
/* It is possible to check whether a particular operation op */
|
||||
/* is available on a particular platform by checking whether */
|
||||
/* AO_HAVE_op is defined. We make heavy use of these macros */
|
||||
/* internally. */
|
||||
|
||||
/* The rest of this file basically has three sections: */
|
||||
/* */
|
||||
/* Some utility and default definitions. */
|
||||
/* */
|
||||
/* The architecture dependent section: */
|
||||
/* This defines atomic operations that have direct hardware */
|
||||
/* support on a particular platform, mostly by uncluding the */
|
||||
/* appropriate compiler- and hardware-dependent file. */
|
||||
/* */
|
||||
/* The synthesis section: */
|
||||
/* This tries to define other atomic operations in terms of */
|
||||
/* those that are explicitly available on the platform. */
|
||||
/* This section is hardware independent. */
|
||||
/* We make no attempt to synthesize operations in ways that */
|
||||
/* effectively introduce locks, except for the debugging/demo */
|
||||
/* pthread-based implementation at the beginning. A more */
|
||||
/* relistic implementation that falls back to locks could be */
|
||||
/* added as a higher layer. But that would sacrifice */
|
||||
/* usability from signal handlers. */
|
||||
/* The synthesis section is implemented almost entirely in */
|
||||
/* atomic_ops_generalize.h. */
|
||||
|
||||
/* Some common defaults. Overridden for some architectures. */
|
||||
#define AO_t unsigned long
|
||||
/* Could conceivably be redefined below if/when we add */
|
||||
/* win64 support. */
|
||||
|
||||
/* The test_and_set primitive returns an AO_TS_VAL_t value. */
|
||||
/* AO_TS_t is the type of an in-memory test-and-set location. */
|
||||
|
||||
#define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
|
||||
|
||||
/* Platform-dependent stuff: */
|
||||
#if defined(__GNUC__) || defined(_MSC_VER) || defined(__INTEL_COMPILER)
|
||||
# define AO_INLINE static __inline
|
||||
#else
|
||||
# define AO_INLINE static
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
|
||||
# define AO_compiler_barrier() __asm__ __volatile__("" : : : "memory")
|
||||
#elif defined(_MSC_VER)
|
||||
# define AO_compiler_barrier() __asm { }
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
# define AO_compiler_barrier() __memory_barrier() /* Too strong? IA64-only? */
|
||||
#elif defined(_HPUX_SOURCE)
|
||||
# if defined(__ia64)
|
||||
# include <machine/sys/inline.h>
|
||||
# define AO_compiler_barrier() _Asm_sched_fence()
|
||||
# else
|
||||
/* FIXME - We dont know how to do this. This is a guess. */
|
||||
/* And probably a bad one. */
|
||||
static volatile int AO_barrier_dummy;
|
||||
# define AO_compiler_barrier() AO_barrier_dummy = AO_barrier_dummy
|
||||
# endif
|
||||
#else
|
||||
/* We conjecture that the following usually gives us the right */
|
||||
/* semantics or an error. */
|
||||
# define AO_compiler_barrier() asm("")
|
||||
#endif
|
||||
|
||||
#if defined(AO_USE_PTHREAD_DEFS)
|
||||
# include "atomic_ops/sysdeps/generic_pthread.h"
|
||||
#endif /* AO_USE_PTHREAD_DEFS */
|
||||
|
||||
#if defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS) \
|
||||
&& !defined(__INTEL_COMPILER)
|
||||
# if defined(__i386__)
|
||||
# include "atomic_ops/sysdeps/gcc/x86.h"
|
||||
# endif /* __i386__ */
|
||||
# if defined(__x86_64__)
|
||||
# include "atomic_ops/sysdeps/gcc/x86_64.h"
|
||||
# endif /* __i386__ */
|
||||
# if defined(__ia64__)
|
||||
# include "atomic_ops/sysdeps/gcc/ia64.h"
|
||||
# define AO_GENERALIZE_TWICE
|
||||
# endif /* __ia64__ */
|
||||
# if defined(__hppa__)
|
||||
# include "atomic_ops/sysdeps/gcc/hppa.h"
|
||||
# define AO_CAN_EMUL_CAS
|
||||
# endif /* __hppa__ */
|
||||
# if defined(__alpha__)
|
||||
# include "atomic_ops/sysdeps/gcc/alpha.h"
|
||||
# define AO_GENERALIZE_TWICE
|
||||
# endif /* __alpha__ */
|
||||
# if defined(__s390__)
|
||||
# include "atomic_ops/sysdeps/gcc/s390.h"
|
||||
# endif /* __s390__ */
|
||||
# if defined(__sparc__)
|
||||
# include "atomic_ops/sysdeps/gcc/sparc.h"
|
||||
# define AO_CAN_EMUL_CAS
|
||||
# endif /* __sparc__ */
|
||||
# if defined(__m68k__)
|
||||
# include "atomic_ops/sysdeps/gcc/m68k.h"
|
||||
# endif /* __m68k__ */
|
||||
# if defined(__powerpc__) || defined(__ppc__)
|
||||
# include "atomic_ops/sysdeps/gcc/powerpc.h"
|
||||
# endif /* __powerpc__ */
|
||||
# if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS)
|
||||
# include "atomic_ops/sysdeps/gcc/arm.h"
|
||||
# endif /* __arm__ */
|
||||
# if defined(__cris__) || defined(CRIS)
|
||||
# include "atomic_ops/sysdeps/gcc/cris.h"
|
||||
# endif
|
||||
#endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
|
||||
|
||||
#if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
|
||||
# if defined(__ia64__)
|
||||
# include "atomic_ops/sysdeps/icc/ia64.h"
|
||||
# define AO_GENERALIZE_TWICE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_HPUX_SOURCE) && !defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS)
|
||||
# if defined(__ia64)
|
||||
# include "atomic_ops/sysdeps/hpc/ia64.h"
|
||||
# define AO_GENERALIZE_TWICE
|
||||
# else
|
||||
# include "atomic_ops/sysdeps/hpc/hppa.h"
|
||||
# define AO_CAN_EMUL_CAS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(__GNUC__) && (defined(sparc) || defined(__sparc)) \
|
||||
&& !defined(AO_USE_PTHREAD_DEFS)
|
||||
# include "atomic_ops/sysdeps/sunc/sparc.h"
|
||||
# define AO_CAN_EMUL_CAS
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# if _M_IX86 >= 400
|
||||
# include "atomic_ops/sysdeps/msftc/x86.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(AO_REQUIRE_CAS) && !defined(AO_HAVE_compare_and_swap) \
|
||||
&& !defined(AO_HAVE_compare_and_swap_full) \
|
||||
&& !defined(AO_HAVE_compare_and_swap_acquire)
|
||||
# if defined(AO_CAN_EMUL_CAS)
|
||||
# include "atomic_ops/sysdeps/emul_cas.h"
|
||||
# else
|
||||
# error Cannot implement AO_compare_and_swap_full on this architecture.
|
||||
# endif
|
||||
#endif /* AO_REQUIRE_CAS && !AO_HAVE_compare_and_swap ... */
|
||||
|
||||
/* The most common way to clear a test-and-set location */
|
||||
/* at the end of a critical section. */
|
||||
#if AO_AO_TS_T && !defined(AO_CLEAR)
|
||||
# define AO_CLEAR(addr) AO_store_release((AO_TS_t *)addr, AO_TS_CLEAR)
|
||||
#endif
|
||||
#if AO_CHAR_TS_T && !defined(AO_CLEAR)
|
||||
# define AO_CLEAR(addr) AO_char_store_release((AO_TS_t *)addr, AO_TS_CLEAR)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The generalization section.
|
||||
* Theoretically this should repeatedly include atomic_ops_generalize.h.
|
||||
* In fact, we observe that this converges after a small fixed number
|
||||
* of iterations, usually one.
|
||||
*/
|
||||
#include "atomic_ops/generalize.h"
|
||||
#ifdef AO_GENERALIZE_TWICE
|
||||
# include "atomic_ops/generalize.h"
|
||||
#endif
|
||||
|
||||
/* For compatibility with version 0.4 and earlier */
|
||||
#define AO_TS_T AO_TS_t
|
||||
#define AO_T AO_t
|
||||
#define AO_TS_VAL AO_TS_VAL_t
|
||||
|
||||
#endif /* ATOMIC_OPS_H */
|
||||
@@ -1,12 +0,0 @@
|
||||
SUBDIRS=sysdeps
|
||||
|
||||
EXTRA_DIST=generalize-small.template
|
||||
|
||||
#Private Headers
|
||||
private_HEADERS=generalize.h generalize-small.h
|
||||
privatedir=${includedir}/atomic_ops/
|
||||
|
||||
generalize-small.h: generalize-small.template
|
||||
sed -e s:XSIZE:byte:g -e s:XCTYPE:char:g $? > $@
|
||||
sed -e s:XSIZE:short:g -e s:XCTYPE:short:g $? >> $@
|
||||
sed -e s:XSIZE:int:g -e s:XCTYPE:int:g $? >> $@
|
||||
@@ -1,480 +0,0 @@
|
||||
# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = src/atomic_ops
|
||||
DIST_COMMON = $(private_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(privatedir)"
|
||||
privateHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(private_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEED_ASM_FALSE = @NEED_ASM_FALSE@
|
||||
NEED_ASM_TRUE = @NEED_ASM_TRUE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PICFLAG = @PICFLAG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
SUBDIRS = sysdeps
|
||||
EXTRA_DIST = generalize-small.template
|
||||
|
||||
#Private Headers
|
||||
private_HEADERS = generalize.h generalize-small.h
|
||||
privatedir = ${includedir}/atomic_ops/
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/atomic_ops/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/atomic_ops/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
install-privateHEADERS: $(private_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(privatedir)" || $(mkdir_p) "$(DESTDIR)$(privatedir)"
|
||||
@list='$(private_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(privateHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(privatedir)/$$f'"; \
|
||||
$(privateHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(privatedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-privateHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(private_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(privatedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(privatedir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(privatedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-privateHEADERS
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-privateHEADERS
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-recursive ctags ctags-recursive \
|
||||
distclean distclean-generic distclean-recursive distclean-tags \
|
||||
distdir dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-privateHEADERS install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-info-am uninstall-privateHEADERS
|
||||
|
||||
|
||||
generalize-small.h: generalize-small.template
|
||||
sed -e s:XSIZE:byte:g -e s:XCTYPE:char:g $? > $@
|
||||
sed -e s:XSIZE:short:g -e s:XCTYPE:short:g $? >> $@
|
||||
sed -e s:XSIZE:int:g -e s:XCTYPE:int:g $? >> $@
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,575 +0,0 @@
|
||||
/* XSIZE_load */
|
||||
#if defined(AO_HAVE_XSIZE_load_acquire) && !defined(AO_HAVE_XSIZE_load)
|
||||
# define AO_XSIZE_load(addr) AO_XSIZE_load_acquire(addr)
|
||||
# define AO_HAVE_XSIZE_load
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_load_full) && !defined(AO_HAVE_XSIZE_load_acquire)
|
||||
# define AO_XSIZE_load_acquire(addr) AO_XSIZE_load_full(addr)
|
||||
# define AO_HAVE_XSIZE_load_acquire
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_load_full) && !defined(AO_HAVE_XSIZE_load_read)
|
||||
# define AO_XSIZE_load_read(addr) AO_XSIZE_load_full(addr)
|
||||
# define AO_HAVE_XSIZE_load_read
|
||||
#endif
|
||||
|
||||
#if !defined(AO_HAVE_XSIZE_load_acquire_read) && defined(AO_HAVE_XSIZE_load_acquire)
|
||||
# define AO_XSIZE_load_acquire_read(addr) AO_XSIZE_load_acquire(addr)
|
||||
# define AO_HAVE_XSIZE_load_acquire_read
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_load) && defined(AO_HAVE_nop_full) && \
|
||||
!defined(AO_HAVE_XSIZE_load_acquire)
|
||||
AO_INLINE unsigned XCTYPE
|
||||
AO_XSIZE_load_acquire(volatile unsigned XCTYPE *addr)
|
||||
{
|
||||
unsigned XCTYPE result = AO_XSIZE_load(addr);
|
||||
/* Acquire barrier would be useless, since the load could be delayed */
|
||||
/* beyond it. */
|
||||
AO_nop_full();
|
||||
return result;
|
||||
}
|
||||
# define AO_HAVE_XSIZE_load_acquire
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_load) && defined(AO_HAVE_nop_read) && \
|
||||
!defined(AO_HAVE_XSIZE_load_read)
|
||||
AO_INLINE unsigned XCTYPE
|
||||
AO_XSIZE_load_read(volatile unsigned XCTYPE *addr)
|
||||
{
|
||||
unsigned XCTYPE result = AO_XSIZE_load(addr);
|
||||
/* Acquire barrier would be useless, since the load could be delayed */
|
||||
/* beyond it. */
|
||||
AO_nop_read();
|
||||
return result;
|
||||
}
|
||||
# define AO_HAVE_XSIZE_load_read
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_load_acquire) && defined(AO_HAVE_nop_full) && \
|
||||
!defined(AO_HAVE_XSIZE_load_full)
|
||||
# define AO_XSIZE_load_full(addr) (AO_nop_full(), AO_XSIZE_load_acquire(addr))
|
||||
# define AO_HAVE_XSIZE_load_full
|
||||
#endif
|
||||
|
||||
#if !defined(AO_HAVE_XSIZE_load_acquire_read) && defined(AO_HAVE_XSIZE_load_read)
|
||||
# define AO_XSIZE_load_acquire_read(addr) AO_XSIZE_load_read(addr)
|
||||
# define AO_HAVE_XSIZE_load_acquire_read
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_load_acquire_read) && !defined(AO_HAVE_XSIZE_load)
|
||||
# define AO_XSIZE_load(addr) AO_XSIZE_load_acquire_read(addr)
|
||||
# define AO_HAVE_XSIZE_load
|
||||
#endif
|
||||
|
||||
#ifdef AO_NO_DD_ORDERING
|
||||
# if defined(AO_HAVE_XSIZE_load_acquire_read)
|
||||
# define AO_XSIZE_load_dd_acquire_read(addr) \
|
||||
AO_XSIZE_load_acquire_read(addr)
|
||||
# define AO_HAVE_XSIZE_load_dd_acquire_read
|
||||
# endif
|
||||
#else
|
||||
# if defined(AO_HAVE_XSIZE_load)
|
||||
# define AO_XSIZE_load_dd_acquire_read(addr) \
|
||||
AO_XSIZE_load(addr)
|
||||
# define AO_HAVE_XSIZE_load_dd_acquire_read
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* XSIZE_store */
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_store_release) && !defined(AO_HAVE_XSIZE_store)
|
||||
# define AO_XSIZE_store(addr, val) AO_XSIZE_store_release(addr,val)
|
||||
# define AO_HAVE_XSIZE_store
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_store_full) && !defined(AO_HAVE_XSIZE_store_release)
|
||||
# define AO_XSIZE_store_release(addr,val) AO_XSIZE_store_full(addr,val)
|
||||
# define AO_HAVE_XSIZE_store_release
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_store_full) && !defined(AO_HAVE_XSIZE_store_write)
|
||||
# define AO_XSIZE_store_write(addr,val) AO_XSIZE_store_full(addr,val)
|
||||
# define AO_HAVE_XSIZE_store_write
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_store_release) && \
|
||||
!defined(AO_HAVE_XSIZE_store_release_write)
|
||||
# define AO_XSIZE_store_release_write(addr, val) \
|
||||
AO_XSIZE_store_release(addr,val)
|
||||
# define AO_HAVE_XSIZE_store_release_write
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_store_write) && !defined(AO_HAVE_XSIZE_store)
|
||||
# define AO_XSIZE_store(addr, val) AO_XSIZE_store_write(addr,val)
|
||||
# define AO_HAVE_XSIZE_store
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_store) && defined(AO_HAVE_nop_full) && \
|
||||
!defined(AO_HAVE_XSIZE_store_release)
|
||||
# define AO_XSIZE_store_release(addr,val) \
|
||||
(AO_nop_full(), AO_XSIZE_store(addr,val))
|
||||
# define AO_HAVE_XSIZE_store_release
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_XSIZE_store) && \
|
||||
!defined(AO_HAVE_XSIZE_store_write)
|
||||
# define AO_XSIZE_store_write(addr, val) \
|
||||
(AO_nop_write(), AO_XSIZE_store(addr,val))
|
||||
# define AO_HAVE_XSIZE_store_write
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_store_write) && \
|
||||
!defined(AO_HAVE_XSIZE_store_release_write)
|
||||
# define AO_XSIZE_store_release_write(addr, val) AO_XSIZE_store_write(addr,val)
|
||||
# define AO_HAVE_XSIZE_store_release_write
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_store_release) && defined(AO_HAVE_nop_full) && \
|
||||
!defined(AO_HAVE_XSIZE_store_full)
|
||||
# define AO_XSIZE_store_full(addr, val) \
|
||||
(AO_XSIZE_store_release(addr, val), AO_nop_full())
|
||||
# define AO_HAVE_XSIZE_store_full
|
||||
#endif
|
||||
|
||||
|
||||
/* XSIZE_fetch_and_add */
|
||||
#if defined(AO_HAVE_XSIZE_compare_and_swap_full) && \
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add_full)
|
||||
AO_INLINE AO_t
|
||||
AO_XSIZE_fetch_and_add_full(volatile unsigned XCTYPE *addr,
|
||||
unsigned XCTYPE incr)
|
||||
{
|
||||
unsigned XCTYPE old;
|
||||
do
|
||||
{
|
||||
old = *addr;
|
||||
}
|
||||
while (!AO_XSIZE_compare_and_swap_full(addr, old, old+incr));
|
||||
return old;
|
||||
}
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_full
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_compare_and_swap_acquire) && \
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
|
||||
AO_INLINE AO_t
|
||||
AO_XSIZE_fetch_and_add_acquire(volatile unsigned XCTYPE *addr,
|
||||
unsigned XCTYPE incr)
|
||||
{
|
||||
unsigned XCTYPE old;
|
||||
do
|
||||
{
|
||||
old = *addr;
|
||||
}
|
||||
while (!AO_XSIZE_compare_and_swap_acquire(addr, old, old+incr));
|
||||
return old;
|
||||
}
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_acquire
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_compare_and_swap_release) && \
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add_release)
|
||||
AO_INLINE AO_t
|
||||
AO_XSIZE_fetch_and_add_release(volatile unsigned XCTYPE *addr,
|
||||
unsigned XCTYPE incr)
|
||||
{
|
||||
unsigned XCTYPE old;
|
||||
do
|
||||
{
|
||||
old = *addr;
|
||||
}
|
||||
while (!AO_XSIZE_compare_and_swap_release(addr, old, old+incr));
|
||||
return old;
|
||||
}
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_release
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_full)
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_add_release)
|
||||
# define AO_XSIZE_fetch_and_add_release(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_full(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_release
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
|
||||
# define AO_XSIZE_fetch_and_add_acquire(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_full(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_acquire
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_add_write)
|
||||
# define AO_XSIZE_fetch_and_add_write(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_full(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_write
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_add_read)
|
||||
# define AO_XSIZE_fetch_and_add_read(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_full(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_read
|
||||
# endif
|
||||
#endif /* AO_HAVE_XSIZE_fetch_and_add_full */
|
||||
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add_release)
|
||||
# define AO_XSIZE_fetch_and_add(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_release(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
|
||||
# define AO_XSIZE_fetch_and_add(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_acquire(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add_write)
|
||||
# define AO_XSIZE_fetch_and_add(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_write(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add_read)
|
||||
# define AO_XSIZE_fetch_and_add(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_read(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
|
||||
defined(AO_HAVE_nop_full) && \
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add_full)
|
||||
# define AO_XSIZE_fetch_and_add_full(addr, val) \
|
||||
(AO_nop_full(), AO_XSIZE_fetch_and_add_acquire(addr, val))
|
||||
#endif
|
||||
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add_release_write) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add_write)
|
||||
# define AO_XSIZE_fetch_and_add_release_write(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_write(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_release_write
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add_release_write) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add_release)
|
||||
# define AO_XSIZE_fetch_and_add_release_write(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_release(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_release_write
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add_read)
|
||||
# define AO_XSIZE_fetch_and_add_acquire_read(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_read(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_acquire_read
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
|
||||
# define AO_XSIZE_fetch_and_add_acquire_read(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_acquire(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_acquire_read
|
||||
#endif
|
||||
|
||||
#ifdef AO_NO_DD_ORDERING
|
||||
# if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read)
|
||||
# define AO_XSIZE_fetch_and_add_dd_acquire_read(addr, val) \
|
||||
AO_XSIZE_fetch_and_add_acquire_read(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_dd_acquire_read
|
||||
# endif
|
||||
#else
|
||||
# if defined(AO_HAVE_XSIZE_fetch_and_add)
|
||||
# define AO_XSIZE_fetch_and_add_dd_acquire_read(addr, val) \
|
||||
AO_XSIZE_fetch_and_add(addr, val)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add_dd_acquire_read
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* XSIZE_fetch_and_add1 */
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_full) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1_full)
|
||||
# define AO_XSIZE_fetch_and_add1_full(addr) \
|
||||
AO_XSIZE_fetch_and_add_full(addr,1)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_full
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_release) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1_release)
|
||||
# define AO_XSIZE_fetch_and_add1_release(addr) \
|
||||
AO_XSIZE_fetch_and_add_release(addr,1)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_release
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
|
||||
# define AO_XSIZE_fetch_and_add1_acquire(addr) \
|
||||
AO_XSIZE_fetch_and_add_acquire(addr,1)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_acquire
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_write) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1_write)
|
||||
# define AO_XSIZE_fetch_and_add1_write(addr) \
|
||||
AO_XSIZE_fetch_and_add_write(addr,1)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_write
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_read) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1_read)
|
||||
# define AO_XSIZE_fetch_and_add1_read(addr) \
|
||||
AO_XSIZE_fetch_and_add_read(addr,1)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_read
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_release_write) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1_release_write)
|
||||
# define AO_XSIZE_fetch_and_add1_release_write(addr) \
|
||||
AO_XSIZE_fetch_and_add_release_write(addr,1)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_release_write
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read)
|
||||
# define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_add_acquire_read(addr,1)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1)
|
||||
# define AO_XSIZE_fetch_and_add1(addr) \
|
||||
AO_XSIZE_fetch_and_add(addr,1)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add1_full)
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_add1_release)
|
||||
# define AO_XSIZE_fetch_and_add1_release(addr) \
|
||||
AO_XSIZE_fetch_and_add1_full(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_release
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
|
||||
# define AO_XSIZE_fetch_and_add1_acquire(addr) \
|
||||
AO_XSIZE_fetch_and_add1_full(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_acquire
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_add1_write)
|
||||
# define AO_XSIZE_fetch_and_add1_write(addr) \
|
||||
AO_XSIZE_fetch_and_add1_full(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_write
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_add1_read)
|
||||
# define AO_XSIZE_fetch_and_add1_read(addr) \
|
||||
AO_XSIZE_fetch_and_add1_full(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_read
|
||||
# endif
|
||||
#endif /* AO_HAVE_XSIZE_fetch_and_add1_full */
|
||||
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add1_release)
|
||||
# define AO_XSIZE_fetch_and_add1(addr) \
|
||||
AO_XSIZE_fetch_and_add1_release(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
|
||||
# define AO_XSIZE_fetch_and_add1(addr) \
|
||||
AO_XSIZE_fetch_and_add1_acquire(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add1_write)
|
||||
# define AO_XSIZE_fetch_and_add1(addr) \
|
||||
AO_XSIZE_fetch_and_add1_write(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add1_read)
|
||||
# define AO_XSIZE_fetch_and_add1(addr) \
|
||||
AO_XSIZE_fetch_and_add1_read(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add1_acquire) &&\
|
||||
defined(AO_HAVE_nop_full) && \
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_add1_full)
|
||||
# define AO_XSIZE_fetch_and_add1_full(addr) \
|
||||
(AO_nop_full(), AO_XSIZE_fetch_and_add1_acquire(addr))
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_full
|
||||
#endif
|
||||
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add1_release_write) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add1_write)
|
||||
# define AO_XSIZE_fetch_and_add1_release_write(addr) \
|
||||
AO_XSIZE_fetch_and_add1_write(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_release_write
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add1_release_write) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add1_release)
|
||||
# define AO_XSIZE_fetch_and_add1_release_write(addr) \
|
||||
AO_XSIZE_fetch_and_add1_release(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_release_write
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add1_read)
|
||||
# define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_add1_read(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
|
||||
# define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_add1_acquire(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
|
||||
#endif
|
||||
|
||||
#ifdef AO_NO_DD_ORDERING
|
||||
# if defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read)
|
||||
# define AO_XSIZE_fetch_and_add1_dd_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_add1_acquire_read(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_dd_acquire_read
|
||||
# endif
|
||||
#else
|
||||
# if defined(AO_HAVE_XSIZE_fetch_and_add1)
|
||||
# define AO_XSIZE_fetch_and_add1_dd_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_add1(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_add1_dd_acquire_read
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* XSIZE_fetch_and_sub1 */
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_full) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
|
||||
# define AO_XSIZE_fetch_and_sub1_full(addr) \
|
||||
AO_XSIZE_fetch_and_add_full(addr,(unsigned XCTYPE)(-1))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_full
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_release) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
|
||||
# define AO_XSIZE_fetch_and_sub1_release(addr) \
|
||||
AO_XSIZE_fetch_and_add_release(addr,(unsigned XCTYPE)(-1))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_release
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
|
||||
# define AO_XSIZE_fetch_and_sub1_acquire(addr) \
|
||||
AO_XSIZE_fetch_and_add_acquire(addr,(unsigned XCTYPE)(-1))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_acquire
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_write) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
|
||||
# define AO_XSIZE_fetch_and_sub1_write(addr) \
|
||||
AO_XSIZE_fetch_and_add_write(addr,(unsigned XCTYPE)(-1))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_write
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_read) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
|
||||
# define AO_XSIZE_fetch_and_sub1_read(addr) \
|
||||
AO_XSIZE_fetch_and_add_read(addr,(unsigned XCTYPE)(-1))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_read
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_release_write) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write)
|
||||
# define AO_XSIZE_fetch_and_sub1_release_write(addr) \
|
||||
AO_XSIZE_fetch_and_add_release_write(addr,(unsigned XCTYPE)(-1))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_release_write
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read)
|
||||
# define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_add_acquire_read(addr,(unsigned XCTYPE)(-1))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
|
||||
#endif
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_add) &&\
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1)
|
||||
# define AO_XSIZE_fetch_and_sub1(addr) \
|
||||
AO_XSIZE_fetch_and_add(addr,(unsigned XCTYPE)(-1))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
|
||||
# define AO_XSIZE_fetch_and_sub1_release(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_full(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_release
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
|
||||
# define AO_XSIZE_fetch_and_sub1_acquire(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_full(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_acquire
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
|
||||
# define AO_XSIZE_fetch_and_sub1_write(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_full(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_write
|
||||
# endif
|
||||
# if !defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
|
||||
# define AO_XSIZE_fetch_and_sub1_read(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_full(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_read
|
||||
# endif
|
||||
#endif /* AO_HAVE_XSIZE_fetch_and_sub1_full */
|
||||
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
|
||||
# define AO_XSIZE_fetch_and_sub1(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_release(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
|
||||
# define AO_XSIZE_fetch_and_sub1(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_acquire(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
|
||||
# define AO_XSIZE_fetch_and_sub1(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_write(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
|
||||
# define AO_XSIZE_fetch_and_sub1(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_read(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1
|
||||
#endif
|
||||
|
||||
#if defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire) &&\
|
||||
defined(AO_HAVE_nop_full) && \
|
||||
!defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
|
||||
# define AO_XSIZE_fetch_and_sub1_full(addr) \
|
||||
(AO_nop_full(), AO_XSIZE_fetch_and_sub1_acquire(addr))
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_full
|
||||
#endif
|
||||
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
|
||||
# define AO_XSIZE_fetch_and_sub1_release_write(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_write(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_release_write
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
|
||||
# define AO_XSIZE_fetch_and_sub1_release_write(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_release(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_release_write
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
|
||||
# define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_read(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
|
||||
#endif
|
||||
#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read) && \
|
||||
defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
|
||||
# define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_acquire(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
|
||||
#endif
|
||||
|
||||
#ifdef AO_NO_DD_ORDERING
|
||||
# if defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read)
|
||||
# define AO_XSIZE_fetch_and_sub1_dd_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_sub1_acquire_read(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_dd_acquire_read
|
||||
# endif
|
||||
#else
|
||||
# if defined(AO_HAVE_XSIZE_fetch_and_sub1)
|
||||
# define AO_XSIZE_fetch_and_sub1_dd_acquire_read(addr) \
|
||||
AO_XSIZE_fetch_and_sub1(addr)
|
||||
# define AO_HAVE_XSIZE_fetch_and_sub1_dd_acquire_read
|
||||
# endif
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,45 +0,0 @@
|
||||
#General sysdep utility headers, followed by the arch-specific ones
|
||||
nobase_sysdep_HEADERS= generic_pthread.h \
|
||||
atomic_load_store.h \
|
||||
aligned_atomic_load_store.h \
|
||||
acquire_release_volatile.h \
|
||||
char_acquire_release_volatile.h \
|
||||
char_atomic_load_store.h \
|
||||
short_acquire_release_volatile.h \
|
||||
short_aligned_atomic_load_store.h \
|
||||
short_atomic_load_store.h \
|
||||
int_acquire_release_volatile.h \
|
||||
int_aligned_atomic_load_store.h \
|
||||
int_atomic_load_store.h \
|
||||
all_acquire_release_volatile.h \
|
||||
all_aligned_atomic_load_store.h \
|
||||
all_atomic_load_store.h \
|
||||
ordered_except_wr.h \
|
||||
ordered.h \
|
||||
ao_t_is_int.h \
|
||||
test_and_set_t_is_ao_t.h \
|
||||
test_and_set_t_is_char.h \
|
||||
emul_cas.h \
|
||||
standard_ao_double_t.h \
|
||||
README \
|
||||
\
|
||||
gcc/alpha.h gcc/arm.h gcc/x86.h \
|
||||
gcc/hppa.h gcc/ia64.h \
|
||||
gcc/powerpc.h gcc/sparc.h \
|
||||
gcc/hppa.h gcc/m68k.h gcc/s390.h \
|
||||
gcc/ia64.h gcc/x86_64.h gcc/cris.h \
|
||||
\
|
||||
icc/ia64.h \
|
||||
\
|
||||
msftc/x86.h \
|
||||
\
|
||||
hpc/ia64.h hpc/hppa.h \
|
||||
\
|
||||
sunc/sparc.h \
|
||||
\
|
||||
ibmc/powerpc.h
|
||||
|
||||
sysdepdir= ${includedir}/atomic_ops/sysdeps
|
||||
|
||||
# A few architectures require special .S files
|
||||
EXTRA_DIST = sunc/sparc.S
|
||||
@@ -1,419 +0,0 @@
|
||||
# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = src/atomic_ops/sysdeps
|
||||
DIST_COMMON = README $(nobase_sysdep_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(sysdepdir)"
|
||||
nobase_sysdepHEADERS_INSTALL = $(install_sh_DATA)
|
||||
HEADERS = $(nobase_sysdep_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEED_ASM_FALSE = @NEED_ASM_FALSE@
|
||||
NEED_ASM_TRUE = @NEED_ASM_TRUE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PICFLAG = @PICFLAG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
|
||||
#General sysdep utility headers, followed by the arch-specific ones
|
||||
nobase_sysdep_HEADERS = generic_pthread.h \
|
||||
atomic_load_store.h \
|
||||
aligned_atomic_load_store.h \
|
||||
acquire_release_volatile.h \
|
||||
char_acquire_release_volatile.h \
|
||||
char_atomic_load_store.h \
|
||||
short_acquire_release_volatile.h \
|
||||
short_aligned_atomic_load_store.h \
|
||||
short_atomic_load_store.h \
|
||||
int_acquire_release_volatile.h \
|
||||
int_aligned_atomic_load_store.h \
|
||||
int_atomic_load_store.h \
|
||||
all_acquire_release_volatile.h \
|
||||
all_aligned_atomic_load_store.h \
|
||||
all_atomic_load_store.h \
|
||||
ordered_except_wr.h \
|
||||
ordered.h \
|
||||
ao_t_is_int.h \
|
||||
test_and_set_t_is_ao_t.h \
|
||||
test_and_set_t_is_char.h \
|
||||
emul_cas.h \
|
||||
standard_ao_double_t.h \
|
||||
README \
|
||||
\
|
||||
gcc/alpha.h gcc/arm.h gcc/x86.h \
|
||||
gcc/hppa.h gcc/ia64.h \
|
||||
gcc/powerpc.h gcc/sparc.h \
|
||||
gcc/hppa.h gcc/m68k.h gcc/s390.h \
|
||||
gcc/ia64.h gcc/x86_64.h gcc/cris.h \
|
||||
\
|
||||
icc/ia64.h \
|
||||
\
|
||||
msftc/x86.h \
|
||||
\
|
||||
hpc/ia64.h hpc/hppa.h \
|
||||
\
|
||||
sunc/sparc.h \
|
||||
\
|
||||
ibmc/powerpc.h
|
||||
|
||||
sysdepdir = ${includedir}/atomic_ops/sysdeps
|
||||
|
||||
# A few architectures require special .S files
|
||||
EXTRA_DIST = sunc/sparc.S
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/atomic_ops/sysdeps/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/atomic_ops/sysdeps/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
install-nobase_sysdepHEADERS: $(nobase_sysdep_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(sysdepdir)" || $(mkdir_p) "$(DESTDIR)$(sysdepdir)"
|
||||
@$(am__vpath_adj_setup) \
|
||||
list='$(nobase_sysdep_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
$(am__vpath_adj) \
|
||||
echo " $(nobase_sysdepHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sysdepdir)/$$f'"; \
|
||||
$(nobase_sysdepHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sysdepdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-nobase_sysdepHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@$(am__vpath_adj_setup) \
|
||||
list='$(nobase_sysdep_HEADERS)'; for p in $$list; do \
|
||||
$(am__vpath_adj) \
|
||||
echo " rm -f '$(DESTDIR)$(sysdepdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(sysdepdir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(mkdir_p) $(distdir)/gcc $(distdir)/hpc $(distdir)/ibmc $(distdir)/icc $(distdir)/msftc $(distdir)/sunc
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(sysdepdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-nobase_sysdepHEADERS
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-nobase_sysdepHEADERS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
ctags distclean distclean-generic distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man \
|
||||
install-nobase_sysdepHEADERS install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-nobase_sysdepHEADERS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1,7 +0,0 @@
|
||||
There are two kinds of entities in this directory:
|
||||
|
||||
- Subdirectories corresponding to specific compilers (or compiler/OS combinations).
|
||||
Each of these includes one or more architecture-specific headers.
|
||||
|
||||
- More generic header files corresponding to a particular ordering and/or
|
||||
atomicity property that might be shared by multiple hardware platforms.
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file adds definitions appropriate for environments in which an AO_t
|
||||
* volatile load has acquire semantics, and an AO_t volatile store has release
|
||||
* semantics. This is arguably supposed to be true with the standard Itanium
|
||||
* software conventions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Empirically gcc/ia64 does some reordering of ordinary operations around volatiles
|
||||
* even when we think it shouldn't. Gcc 3.3 and earlier could reorder a volatile store
|
||||
* with another store. As of March 2005, gcc pre-4 reused previously computed
|
||||
* common subexpressions across a volatile load.
|
||||
* Hence we now add compiler barriers for gcc.
|
||||
*/
|
||||
#if !defined(AO_GCC_BARRIER)
|
||||
# if defined(__GNUC__)
|
||||
# define AO_GCC_BARRIER() AO_compiler_barrier()
|
||||
# else
|
||||
# define AO_GCC_BARRIER()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_load_acquire(volatile AO_t *p)
|
||||
{
|
||||
AO_t result = *p;
|
||||
/* A normal volatile load generates an ld.acq */
|
||||
AO_GCC_BARRIER();
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_store_release(volatile AO_t *p, AO_t val)
|
||||
{
|
||||
AO_GCC_BARRIER();
|
||||
/* A normal volatile store generates an st.rel */
|
||||
*p = val;
|
||||
}
|
||||
#define AO_HAVE_store_release
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions for architecturs on which loads and stores of AO_t are
|
||||
* atomic fo all legal alignments.
|
||||
*/
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_load(volatile AO_t *addr)
|
||||
{
|
||||
assert(((unsigned long)addr & (sizeof(AO_t) - 1)) == 0);
|
||||
/* Cast away the volatile for architectures where */
|
||||
/* volatile adds barrier semantics. */
|
||||
return *(AO_t *)addr;
|
||||
}
|
||||
|
||||
#define AO_HAVE_load
|
||||
|
||||
AO_INLINE void
|
||||
AO_store(volatile AO_t *addr, AO_t new_val)
|
||||
{
|
||||
assert(((unsigned long)addr & (sizeof(AO_t) - 1)) == 0);
|
||||
(*(AO_t *)addr) = new_val;
|
||||
}
|
||||
|
||||
#define AO_HAVE_store
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Describes architectures on which volatile AO_t, unsigned char, unsigned
|
||||
* short, and unsigned int loads and stores have acquire/release semantics for
|
||||
* all normally legal alignments.
|
||||
*/
|
||||
#include "acquire_release_volatile.h"
|
||||
#include "char_acquire_release_volatile.h"
|
||||
#include "short_acquire_release_volatile.h"
|
||||
#include "int_acquire_release_volatile.h"
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Describes architectures on which AO_t, unsigned char, unsigned short,
|
||||
* and unsigned int loads and strores are atomic for all normally legal alignments.
|
||||
*/
|
||||
#include "aligned_atomic_load_store.h"
|
||||
#include "char_atomic_load_store.h"
|
||||
#include "short_aligned_atomic_load_store.h"
|
||||
#include "int_aligned_atomic_load_store.h"
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Describes architectures on which AO_t, unsigned char, unsigned short,
|
||||
* and unsigned int loads and strores are atomic for all normally legal
|
||||
* alignments.
|
||||
*/
|
||||
#include "atomic_load_store.h"
|
||||
#include "char_atomic_load_store.h"
|
||||
#include "short_atomic_load_store.h"
|
||||
#include "int_atomic_load_store.h"
|
||||
@@ -1,126 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Inclusion of this file signifies that AO_t is in fact int. Hence
|
||||
* any AO_... operations can also server as AO_int_... operations.
|
||||
* We currently define only the more important ones here, and allow for
|
||||
* the normal generalization process to define the others.
|
||||
* We should probably add others in the future.
|
||||
*/
|
||||
|
||||
#if defined(AO_HAVE_compare_and_swap_full) && \
|
||||
!defined(AO_HAVE_int_compare_and_swap_full)
|
||||
# define AO_int_compare_and_swap_full(addr, old, new_val) \
|
||||
AO_compare_and_swap_full((volatile AO_t *)addr, \
|
||||
(AO_t) old, (AO_t)new_val)
|
||||
# define AO_HAVE_int_compare_and_swap_full
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_compare_and_swap_acquire) && \
|
||||
!defined(AO_HAVE_int_compare_and_swap_acquire)
|
||||
# define AO_int_compare_and_swap_acquire(addr, old, new_val) \
|
||||
AO_compare_and_swap_acquire((volatile AO_t *)addr, \
|
||||
(AO_t) old, (AO_t)new_val)
|
||||
# define AO_HAVE_int_compare_and_swap_acquire
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_compare_and_swap_release) && \
|
||||
!defined(AO_HAVE_int_compare_and_swap_release)
|
||||
# define AO_int_compare_and_swap_release(addr, old, new_val) \
|
||||
AO_compare_and_swap_release((volatile AO_t *)addr, \
|
||||
(AO_t) old, (AO_t)new_val)
|
||||
# define AO_HAVE_int_compare_and_swap_release
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_compare_and_swap_write) && \
|
||||
!defined(AO_HAVE_int_compare_and_swap_write)
|
||||
# define AO_int_compare_and_swap_write(addr, old, new_val) \
|
||||
AO_compare_and_swap_write((volatile AO_t *)addr, \
|
||||
(AO_t) old, (AO_t)new_val)
|
||||
# define AO_HAVE_int_compare_and_swap_write
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_compare_and_swap_read) && \
|
||||
!defined(AO_HAVE_int_compare_and_swap_read)
|
||||
# define AO_int_compare_and_swap_read(addr, old, new_val) \
|
||||
AO_compare_and_swap_read((volatile AO_t *)addr, \
|
||||
(AO_t) old, (AO_t)new_val)
|
||||
# define AO_HAVE_int_compare_and_swap_read
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_compare_and_swap) && \
|
||||
!defined(AO_HAVE_int_compare_and_swap)
|
||||
# define AO_int_compare_and_swap(addr, old, new_val) \
|
||||
AO_compare_and_swap((volatile AO_t *)addr, \
|
||||
(AO_t) old, (AO_t)new_val)
|
||||
# define AO_HAVE_int_compare_and_swap
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_load_acquire) && \
|
||||
!defined(AO_HAVE_int_load_acquire)
|
||||
# define AO_int_load_acquire(addr) (int)AO_load_acquire((volatile AO_t *)addr)
|
||||
# define AO_HAVE_int_load_acquire
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_store_release) && \
|
||||
!defined(AO_HAVE_int_store_release)
|
||||
# define AO_int_store_release(addr, val) \
|
||||
AO_store_release((volatile AO_t *)addr, (AO_t)val)
|
||||
# define AO_HAVE_int_store_release
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_fetch_and_add_full) && \
|
||||
!defined(AO_HAVE_int_fetch_and_add_full)
|
||||
# define AO_int_fetch_and_add_full(addr, incr) \
|
||||
(int)AO_fetch_and_add_full((volatile AO_t *)addr, (AO_t)incr)
|
||||
# define AO_HAVE_int_fetch_and_add_full
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_fetch_and_add1_acquire) && \
|
||||
!defined(AO_HAVE_int_fetch_and_add1_acquire)
|
||||
# define AO_int_fetch_and_add1_acquire(addr) \
|
||||
(int)AO_fetch_and_add1_acquire((volatile AO_t *)addr)
|
||||
# define AO_HAVE_int_fetch_and_add1_acquire
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_fetch_and_add1_release) && \
|
||||
!defined(AO_HAVE_int_fetch_and_add1_release)
|
||||
# define AO_int_fetch_and_add1_release(addr) \
|
||||
(int)AO_fetch_and_add1_release((volatile AO_t *)addr)
|
||||
# define AO_HAVE_int_fetch_and_add1_release
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_fetch_and_sub1_acquire) && \
|
||||
!defined(AO_HAVE_int_fetch_and_sub1_acquire)
|
||||
# define AO_int_fetch_and_sub1_acquire(addr) \
|
||||
(int)AO_fetch_and_sub1_acquire((volatile AO_t *)addr)
|
||||
# define AO_HAVE_int_fetch_and_sub1_acquire
|
||||
# endif
|
||||
|
||||
#if defined(AO_HAVE_fetch_and_sub1_release) && \
|
||||
!defined(AO_HAVE_int_fetch_and_sub1_release)
|
||||
# define AO_int_fetch_and_sub1_release(addr) \
|
||||
(int)AO_fetch_and_sub1_release((volatile AO_t *)addr)
|
||||
# define AO_HAVE_int_fetch_and_sub1_release
|
||||
# endif
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions for architecturs on which loads and stores of AO_t are
|
||||
* atomic fo all legal alignments.
|
||||
*/
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_load(volatile AO_t *addr)
|
||||
{
|
||||
/* Cast away the volatile for architectures like IA64 where */
|
||||
/* volatile adds barrier semantics. */
|
||||
return (*(AO_t *)addr);
|
||||
}
|
||||
|
||||
#define AO_HAVE_load
|
||||
|
||||
AO_INLINE void
|
||||
AO_store(volatile AO_t *addr, AO_t new_val)
|
||||
{
|
||||
(*(AO_t *)addr) = new_val;
|
||||
}
|
||||
|
||||
#define AO_HAVE_store
|
||||
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file adds definitions appropriate for environments in which an unsigned char
|
||||
* volatile load has acquire semantics, and an unsigned char volatile store has release
|
||||
* semantics. This is true with the standard Itanium ABI.
|
||||
*/
|
||||
#if !defined(AO_GCC_BARRIER)
|
||||
# if defined(__GNUC__)
|
||||
# define AO_GCC_BARRIER() AO_compiler_barrier()
|
||||
# else
|
||||
# define AO_GCC_BARRIER()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
AO_INLINE unsigned char
|
||||
AO_char_load_acquire(volatile unsigned char *p)
|
||||
{
|
||||
unsigned char result = *p;
|
||||
/* A normal volatile load generates an ld.acq */
|
||||
AO_GCC_BARRIER();
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_char_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_char_store_release(volatile unsigned char *p, unsigned char val)
|
||||
{
|
||||
AO_GCC_BARRIER();
|
||||
/* A normal volatile store generates an st.rel */
|
||||
*p = val;
|
||||
}
|
||||
#define AO_HAVE_char_store_release
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions for architecturs on which loads and stores of unsigned char are
|
||||
* atomic for all legal alignments.
|
||||
*/
|
||||
|
||||
AO_INLINE unsigned char
|
||||
AO_char_load(volatile unsigned char *addr)
|
||||
{
|
||||
/* Cast away the volatile for architectures like IA64 where */
|
||||
/* volatile adds barrier semantics. */
|
||||
return (*(unsigned char *)addr);
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_load
|
||||
|
||||
AO_INLINE void
|
||||
AO_char_store(volatile unsigned char *addr, unsigned char new_val)
|
||||
{
|
||||
(*(unsigned char *)addr) = new_val;
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_store
|
||||
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ensure, if at all possible, that AO_compare_and_swap_full() is
|
||||
* available. The emulation should be brute-force signal-safe, even
|
||||
* though it actually blocks.
|
||||
* Including this file will generate an error if AO_compare_and_swap_full()
|
||||
* cannot be made available.
|
||||
* This will be included from platform-specific atomic_ops files
|
||||
* id appropriate, and if AO_FORCE_CAS is defined. It should not be
|
||||
* included directly, especially since it affects the implementation
|
||||
* of other atomic update primitives.
|
||||
* The implementation assumes that only AO_store_XXX and AO_test_and_set_XXX
|
||||
* variants are defined, and that AO_test_and_set_XXX is not used to
|
||||
* operate on compare_and_swap locations.
|
||||
*/
|
||||
|
||||
#if !defined(ATOMIC_OPS_H)
|
||||
# error This file should not be included directly.
|
||||
#endif
|
||||
|
||||
#ifndef AO_HAVE_double_t
|
||||
# include "standard_ao_double_t.h"
|
||||
#endif
|
||||
|
||||
int AO_compare_and_swap_emulation(volatile AO_t *addr, AO_t old,
|
||||
AO_t new_val);
|
||||
|
||||
int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
|
||||
AO_t old_val1, AO_t old_val2,
|
||||
AO_t new_val1, AO_t new_val2);
|
||||
|
||||
void AO_store_full_emulation(volatile AO_t *addr, AO_t val);
|
||||
|
||||
#define AO_compare_and_swap_full(addr, old, newval) \
|
||||
AO_compare_and_swap_emulation(addr, old, newval)
|
||||
#define AO_HAVE_compare_and_swap_full
|
||||
|
||||
#ifndef AO_HAVE_compare_double_and_swap_double
|
||||
# define AO_compare_double_and_swap_double_full(addr, old1, old2, \
|
||||
newval1, newval2) \
|
||||
AO_compare_double_and_swap_double_emulation(addr, old1, old2, \
|
||||
newval1, newval2)
|
||||
# define AO_HAVE_compare_double_and_swap_double_full
|
||||
#endif
|
||||
|
||||
#undef AO_store
|
||||
#undef AO_HAVE_store
|
||||
#undef AO_store_write
|
||||
#undef AO_HAVE_store_write
|
||||
#undef AO_store_release
|
||||
#undef AO_HAVE_store_release
|
||||
#undef AO_store_full
|
||||
#undef AO_HAVE_store_full
|
||||
#define AO_store_full(addr, val) AO_store_full_emulation(addr, val)
|
||||
#define AO_HAVE_store_full
|
||||
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../atomic_load_store.h"
|
||||
|
||||
#include "../test_and_set_t_is_ao_t.h"
|
||||
|
||||
#define AO_NO_DD_ORDERING
|
||||
/* Data dependence does not imply read ordering. */
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
__asm__ __volatile__("mb" : : : "memory");
|
||||
}
|
||||
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_write()
|
||||
{
|
||||
__asm__ __volatile__("wmb" : : : "memory");
|
||||
}
|
||||
|
||||
#define AO_HAVE_nop_write
|
||||
|
||||
/* mb should be used for AO_nop_read(). That's the default. */
|
||||
|
||||
/* We believe that ldq_l ... stq_c does not imply any memory barrier. */
|
||||
/* We should add an explicit fetch_and_add definition. */
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
unsigned long was_equal;
|
||||
unsigned long temp;
|
||||
|
||||
__asm__ __volatile__(
|
||||
"1: ldq_l %0,%1\n"
|
||||
" cmpeq %0,%4,%2\n"
|
||||
" mov %3,%0\n"
|
||||
" beq %2,2f\n"
|
||||
" stq_c %0,%1\n"
|
||||
" beq %0,1b\n"
|
||||
"2:\n"
|
||||
:"=&r" (temp), "=m" (*addr), "=&r" (was_equal)
|
||||
: "r" (new_val), "Ir" (old)
|
||||
:"memory");
|
||||
return was_equal;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* FIXME. Very incomplete. No support for 64 bits. */
|
||||
|
||||
#include "../all_atomic_load_store.h"
|
||||
|
||||
#include "../test_and_set_t_is_ao_t.h" /* Probably suboptimal */
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr) {
|
||||
int oldval;
|
||||
int temp = 1; /* locked value */
|
||||
|
||||
__asm__ __volatile__ (
|
||||
" l %0,0(%2)\n"
|
||||
"0: cs %0,%1,0(%2)\n"
|
||||
" jl 0b"
|
||||
: "=&d" (ret)
|
||||
: "d" (1), "a" (addr)
|
||||
: "cc", "memory");
|
||||
return oldval;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Most of this code originally comes from Hans-Peter Nilsson. It is included
|
||||
* here with his permission.
|
||||
*
|
||||
* This version has not been tested. It was coped here from a GC
|
||||
* patch so that we wouldn't lose the code in the upgrade to gc7.
|
||||
*/
|
||||
|
||||
#include "../all_atomic_load_store.h"
|
||||
|
||||
#include "../ordered.h" /* There are no multiprocessor implementations. */
|
||||
|
||||
#include "../test_and_set_t_is_ao_t.h"
|
||||
|
||||
/*
|
||||
* The architecture apparently supports an "f" flag which is
|
||||
* set on preemption. This essentially gives us load-locked,
|
||||
* store-conditional primitives, though I'm not quite sure how
|
||||
* this would work on a hypothetical multiprocessor. -HB
|
||||
*
|
||||
* For details, see
|
||||
* http://developer.axis.com/doc/hardware/etrax100lx/prog_man/
|
||||
* 1_architectural_description.pdf
|
||||
*
|
||||
* Presumably many other primitives (notably CAS, including the double-
|
||||
* width versions) could be implemented in this manner, if someone got
|
||||
* around to it.
|
||||
*/
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr) {
|
||||
/* Ripped from linuxthreads/sysdeps/cris/pt-machine.h */
|
||||
register unsigned long int ret;
|
||||
|
||||
/* Note the use of a dummy output of *addr to expose the write. The
|
||||
memory barrier is to stop *other* writes being moved past this code. */
|
||||
__asm__ __volatile__("clearf\n"
|
||||
"0:\n\t"
|
||||
"movu.b [%2],%0\n\t"
|
||||
"ax\n\t"
|
||||
"move.b %3,[%2]\n\t"
|
||||
"bwf 0b\n\t"
|
||||
"clearf"
|
||||
: "=&r" (ret), "=m" (*addr)
|
||||
: "r" (addr), "r" ((int) 1), "m" (*addr)
|
||||
: "memory");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Modified by Carlos O'Donell <[email protected]>, 2003
|
||||
* - Added self-aligning lock.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../all_atomic_load_store.h"
|
||||
|
||||
/* Some architecture set descriptions include special "ordered" memory */
|
||||
/* operations. As far as we can tell, no existing processors actually */
|
||||
/* require those. Nor does it appear likely that future processors */
|
||||
/* will. */
|
||||
#include "../ordered.h"
|
||||
|
||||
/* GCC will not guarantee the alignment we need, use four lock words */
|
||||
/* and select the correctly aligned datum. See the glibc 2.3.2 */
|
||||
/* linuxthread port for the original implementation. */
|
||||
struct AO_pa_clearable_loc {
|
||||
int data[4];
|
||||
};
|
||||
|
||||
#undef AO_TS_INITIALIZER
|
||||
#define AO_TS_t struct AO_pa_clearable_loc
|
||||
#define AO_TS_INITIALIZER {1,1,1,1}
|
||||
/* Switch meaning of set and clear, since we only have an atomic clear */
|
||||
/* instruction. */
|
||||
typedef enum {AO_PA_TS_set = 0, AO_PA_TS_clear = 1} AO_PA_TS_val;
|
||||
#define AO_TS_VAL_t AO_PA_TS_val
|
||||
#define AO_TS_CLEAR AO_PA_TS_clear
|
||||
#define AO_TS_SET AO_PA_TS_set
|
||||
|
||||
/* The hppa only has one atomic read and modify memory operation, */
|
||||
/* load and clear, so hppa spinlocks must use zero to signify that */
|
||||
/* someone is holding the lock. The address used for the ldcw */
|
||||
/* semaphore must be 16-byte aligned. */
|
||||
|
||||
#define __ldcw(a) ({ \
|
||||
volatile unsigned int __ret; \
|
||||
__asm__ __volatile__("ldcw 0(%2),%0" \
|
||||
: "=r" (__ret), "=m" (*(a)) : "r" (a)); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
/* Because malloc only guarantees 8-byte alignment for malloc'd data, */
|
||||
/* and GCC only guarantees 8-byte alignment for stack locals, we can't */
|
||||
/* be assured of 16-byte alignment for atomic lock data even if we */
|
||||
/* specify "__attribute ((aligned(16)))" in the type declaration. So, */
|
||||
/* we use a struct containing an array of four ints for the atomic lock */
|
||||
/* type and dynamically select the 16-byte aligned int from the array */
|
||||
/* for the semaphore. */
|
||||
#define __PA_LDCW_ALIGNMENT 16
|
||||
#define __ldcw_align(a) ({ \
|
||||
unsigned long __ret = (unsigned long) a; \
|
||||
__ret += __PA_LDCW_ALIGNMENT - 1; \
|
||||
__ret &= ~(__PA_LDCW_ALIGNMENT - 1); \
|
||||
(volatile unsigned int *) __ret; \
|
||||
})
|
||||
|
||||
/* Works on PA 1.1 and PA 2.0 systems */
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t * addr)
|
||||
{
|
||||
volatile unsigned int *a = __ldcw_align (addr);
|
||||
return __ldcw (a);
|
||||
}
|
||||
|
||||
AO_INLINE void
|
||||
AO_pa_clear(volatile AO_TS_t * addr)
|
||||
{
|
||||
volatile unsigned int *a = __ldcw_align (addr);
|
||||
AO_compiler_barrier();
|
||||
*a = 1;
|
||||
}
|
||||
#define AO_CLEAR(addr) AO_pa_clear(addr)
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
@@ -1,297 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "../all_atomic_load_store.h"
|
||||
|
||||
#include "../acquire_release_volatile.h"
|
||||
|
||||
#include "../test_and_set_t_is_char.h"
|
||||
|
||||
#ifdef _ILP32
|
||||
/* 32-bit HP/UX code. */
|
||||
/* This requires pointer "swizzling". Pointers need to be expanded */
|
||||
/* to 64 bits using the addp4 instruction before use. This makes it */
|
||||
/* hard to share code, but we try anyway. */
|
||||
# define AO_LEN "4"
|
||||
/* We assume that addr always appears in argument position 1 in asm */
|
||||
/* code. If it is clobbered due to swizzling, we also need it in */
|
||||
/* second position. Any later arguments are referenced symbolically, */
|
||||
/* so that we don't have to worry about their position. This requires*/
|
||||
/* gcc 3.1, but you shouldn't be using anything older than that on */
|
||||
/* IA64 anyway. */
|
||||
/* The AO_MASK macro is a workaround for the fact that HP/UX gcc */
|
||||
/* appears to otherwise store 64-bit pointers in ar.ccv, i.e. it */
|
||||
/* doesn't appear to clear high bits in a pointer value we pass into */
|
||||
/* assembly code, even if it is supposedly of type AO_t. */
|
||||
# define AO_IN_ADDR "1"(addr)
|
||||
# define AO_OUT_ADDR , "=r"(addr)
|
||||
# define AO_SWIZZLE "addp4 %1=0,%1;;\n"
|
||||
# define AO_MASK(ptr) __asm__("zxt4 %1=%1": "=r"(ptr) : "0"(ptr));
|
||||
#else
|
||||
# define AO_LEN "8"
|
||||
# define AO_IN_ADDR "r"(addr)
|
||||
# define AO_OUT_ADDR
|
||||
# define AO_SWIZZLE
|
||||
# define AO_MASK(ptr)
|
||||
#endif
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
__asm__ __volatile__("mf" : : : "memory");
|
||||
}
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add1_acquire (volatile AO_t *addr)
|
||||
{
|
||||
AO_t result;
|
||||
|
||||
__asm__ __volatile__ (AO_SWIZZLE
|
||||
"fetchadd" AO_LEN ".acq %0=[%1],1":
|
||||
"=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_fetch_and_add1_acquire
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add1_release (volatile AO_t *addr)
|
||||
{
|
||||
AO_t result;
|
||||
|
||||
__asm__ __volatile__ (AO_SWIZZLE
|
||||
"fetchadd" AO_LEN ".rel %0=[%1],1":
|
||||
"=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_add1_release
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_sub1_acquire (volatile AO_t *addr)
|
||||
{
|
||||
AO_t result;
|
||||
|
||||
__asm__ __volatile__ (AO_SWIZZLE
|
||||
"fetchadd" AO_LEN ".acq %0=[%1],-1":
|
||||
"=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_sub1_acquire
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_sub1_release (volatile AO_t *addr)
|
||||
{
|
||||
AO_t result;
|
||||
|
||||
__asm__ __volatile__ (AO_SWIZZLE
|
||||
"fetchadd" AO_LEN ".rel %0=[%1],-1":
|
||||
"=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_sub1_release
|
||||
|
||||
#ifndef _ILP32
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_fetch_and_add1_acquire (volatile unsigned int *addr)
|
||||
{
|
||||
unsigned int result;
|
||||
|
||||
__asm__ __volatile__ ("fetchadd4.acq %0=[%1],1":
|
||||
"=r" (result): AO_IN_ADDR :"memory");
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_int_fetch_and_add1_acquire
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_fetch_and_add1_release (volatile unsigned int *addr)
|
||||
{
|
||||
unsigned int result;
|
||||
|
||||
__asm__ __volatile__ ("fetchadd4.rel %0=[%1],1":
|
||||
"=r" (result): AO_IN_ADDR :"memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_fetch_and_add1_release
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_fetch_and_sub1_acquire (volatile unsigned int *addr)
|
||||
{
|
||||
unsigned int result;
|
||||
|
||||
__asm__ __volatile__ ("fetchadd4.acq %0=[%1],-1":
|
||||
"=r" (result): AO_IN_ADDR :"memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_fetch_and_sub1_acquire
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_fetch_and_sub1_release (volatile unsigned int *addr)
|
||||
{
|
||||
unsigned int result;
|
||||
|
||||
__asm__ __volatile__ ("fetchadd4.rel %0=[%1],-1":
|
||||
"=r" (result): AO_IN_ADDR :"memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_fetch_and_sub1_release
|
||||
|
||||
#endif /* !_ILP32 */
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_acquire(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
AO_t oldval;
|
||||
AO_MASK(old);
|
||||
__asm__ __volatile__(AO_SWIZZLE
|
||||
"mov ar.ccv=%[old] ;; cmpxchg" AO_LEN
|
||||
".acq %0=[%1],%[new_val],ar.ccv"
|
||||
: "=r"(oldval) AO_OUT_ADDR
|
||||
: AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"(old)
|
||||
: "memory");
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_release(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
AO_t oldval;
|
||||
AO_MASK(old);
|
||||
__asm__ __volatile__(AO_SWIZZLE
|
||||
"mov ar.ccv=%[old] ;; cmpxchg" AO_LEN
|
||||
".rel %0=[%1],%[new_val],ar.ccv"
|
||||
: "=r"(oldval) AO_OUT_ADDR
|
||||
: AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"(old)
|
||||
: "memory");
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
|
||||
unsigned char old, unsigned char new_val)
|
||||
{
|
||||
unsigned char oldval;
|
||||
__asm__ __volatile__(AO_SWIZZLE
|
||||
"mov ar.ccv=%[old] ;; cmpxchg1.acq %0=[%1],%[new_val],ar.ccv"
|
||||
: "=r"(oldval) AO_OUT_ADDR
|
||||
: AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
|
||||
: "memory");
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_char_compare_and_swap_release(volatile unsigned char *addr,
|
||||
unsigned char old, unsigned char new_val)
|
||||
{
|
||||
unsigned char oldval;
|
||||
__asm__ __volatile__(AO_SWIZZLE
|
||||
"mov ar.ccv=%[old] ;; cmpxchg1.rel %0=[%1],%[new_val],ar.ccv"
|
||||
: "=r"(oldval) AO_OUT_ADDR
|
||||
: AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
|
||||
: "memory");
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_compare_and_swap_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
|
||||
unsigned short old, unsigned short new_val)
|
||||
{
|
||||
unsigned short oldval;
|
||||
__asm__ __volatile__(AO_SWIZZLE
|
||||
"mov ar.ccv=%[old] ;; cmpxchg2.acq %0=[%1],%[new_val],ar.ccv"
|
||||
: "=r"(oldval) AO_OUT_ADDR
|
||||
: AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
|
||||
: "memory");
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_short_compare_and_swap_release(volatile unsigned short *addr,
|
||||
unsigned short old, unsigned short new_val)
|
||||
{
|
||||
unsigned short oldval;
|
||||
__asm__ __volatile__(AO_SWIZZLE
|
||||
"mov ar.ccv=%[old] ;; cmpxchg2.rel %0=[%1],%[new_val],ar.ccv"
|
||||
: "=r"(oldval) AO_OUT_ADDR
|
||||
: AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
|
||||
: "memory");
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_compare_and_swap_release
|
||||
|
||||
#ifndef _ILP32
|
||||
|
||||
AO_INLINE int
|
||||
AO_int_compare_and_swap_acquire(volatile unsigned int *addr,
|
||||
unsigned int old, unsigned int new_val)
|
||||
{
|
||||
unsigned int oldval;
|
||||
__asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg4.acq %0=[%1],%2,ar.ccv"
|
||||
: "=r"(oldval)
|
||||
: AO_IN_ADDR, "r"(new_val), "r"((AO_t)old) : "memory");
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_int_compare_and_swap_release(volatile unsigned int *addr,
|
||||
unsigned int old, unsigned int new_val)
|
||||
{
|
||||
unsigned int oldval;
|
||||
__asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg4.rel %0=[%1],%2,ar.ccv"
|
||||
: "=r"(oldval)
|
||||
: AO_IN_ADDR, "r"(new_val), "r"((AO_t)old) : "memory");
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_compare_and_swap_release
|
||||
|
||||
#endif /* !_ILP32 */
|
||||
|
||||
/* FIXME: Add compare_and_swap_double as soon as there is widely */
|
||||
/* available hardware that implements it. */
|
||||
|
||||
/* FIXME: Add compare_double_and_swap_double for the _ILP32 case. */
|
||||
|
||||
#ifdef _ILP32
|
||||
# include "../ao_t_is_int.h"
|
||||
#endif
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* FIXME. Very incomplete. */
|
||||
#include "../all_aligned_atomic_load_store.h"
|
||||
|
||||
/* Are there any m68k multiprocessors still around? */
|
||||
/* AFAIK, Alliants were sequentially consistent. */
|
||||
#include "../ordered.h"
|
||||
|
||||
#include "../test_and_set_t_is_ao_t.h"
|
||||
|
||||
/* Contributed by Tony Mantler or new. Should be changed to MIT license? */
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr) {
|
||||
int oldval;
|
||||
|
||||
/* The return value is semi-phony. */
|
||||
/* 'tas' sets bit 7 while the return */
|
||||
/* value pretends bit 0 was set */
|
||||
__asm__ __volatile__(
|
||||
"tas %1@; sne %0; negb %0"
|
||||
: "=d" (oldval)
|
||||
: "a" (addr) : "memory");
|
||||
return oldval;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* FIXME. Incomplete. No support for 64 bits. */
|
||||
/* Memory model documented at http://www-106.ibm.com/developerworks/ */
|
||||
/* eserver/articles/archguide.html and (clearer) */
|
||||
/* http://www-106.ibm.com/developerworks/eserver/articles/powerpc.html. */
|
||||
/* There appears to be no implicit ordering between any kind of */
|
||||
/* independent memory references. */
|
||||
/* Architecture enforces some ordering based on control dependence. */
|
||||
/* I don't know if that could help. */
|
||||
/* Data-dependent loads are always ordered. */
|
||||
/* Based on the above references, eieio is intended for use on */
|
||||
/* uncached memory, which we don't support. It does not order loads */
|
||||
/* from cached memory. */
|
||||
/* Thanks to Maged Michael, Doug Lea, and Roger Hoover for helping to */
|
||||
/* track some of this down and correcting my misunderstandings. -HB */
|
||||
|
||||
#include "../all_aligned_atomic_load_store.h"
|
||||
|
||||
#include "../test_and_set_t_is_ao_t.h"
|
||||
/* There seems to be no byte equivalent of lwarx, so this */
|
||||
/* may really be what we want, at least in the 32-bit case. */
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
__asm__ __volatile__("sync" : : : "memory");
|
||||
}
|
||||
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
/* lwsync apparently works for everything but a StoreLoad barrier. */
|
||||
AO_INLINE void
|
||||
AO_lwsync()
|
||||
{
|
||||
__asm__ __volatile__("lwsync" : : : "memory");
|
||||
}
|
||||
|
||||
#define AO_nop_write() AO_lwsync()
|
||||
#define AO_HAVE_nop_write
|
||||
|
||||
#define AO_nop_read() AO_lwsync()
|
||||
#define AO_HAVE_nop_read
|
||||
|
||||
/* We explicitly specify load_acquire, since it is important, and can */
|
||||
/* be implemented relatively cheaply. It could be implemented */
|
||||
/* with an ordinary load followed by a lwsync. But the general wisdom */
|
||||
/* seems to be that a data dependent branch followed by an isync is */
|
||||
/* cheaper. And the documentation is fairly explicit that this also */
|
||||
/* has acquire semantics. */
|
||||
AO_INLINE AO_t
|
||||
AO_load_acquire(volatile AO_t *addr)
|
||||
{
|
||||
int cr;
|
||||
AO_t result;
|
||||
|
||||
/* FIXME: We should get gcc to allocate one of the condition */
|
||||
/* registers. I always got "impossible constraint" when I */
|
||||
/* tried the "y" constraint. */
|
||||
__asm__ __volatile__ (
|
||||
"lwz %0,%1\n"
|
||||
"cmpw cr7,%0,%0\n"
|
||||
"bne- cr7,1f\n"
|
||||
"1: isync\n"
|
||||
: "=r" (result)
|
||||
: "m"(*addr) : "memory", "cc");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_load_acquire
|
||||
|
||||
/* We explicitly specify store_release, since it relies */
|
||||
/* on the fact that lwsync is also a LoadStore barrier. */
|
||||
AO_INLINE void
|
||||
AO_store_release(volatile AO_t *addr, AO_t value)
|
||||
{
|
||||
AO_lwsync();
|
||||
*addr = value;
|
||||
}
|
||||
|
||||
#define AO_HAVE_load_acquire
|
||||
|
||||
/* This is similar to the code in the garbage collector. Deleting */
|
||||
/* this and having it synthesized from compare_and_swap would probably */
|
||||
/* only cost us a load immediate instruction. */
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set(volatile AO_TS_t *addr) {
|
||||
int oldval;
|
||||
int temp = 1; /* locked value */
|
||||
|
||||
__asm__ __volatile__(
|
||||
"1:lwarx %0,0,%1\n" /* load and reserve */
|
||||
"cmpwi %0, 0\n" /* if load is */
|
||||
"bne 2f\n" /* non-zero, return already set */
|
||||
"stwcx. %2,0,%1\n" /* else store conditional */
|
||||
"bne- 1b\n" /* retry if lost reservation */
|
||||
"2:\n" /* oldval is zero if we set */
|
||||
: "=&r"(oldval)
|
||||
: "r"(addr), "r"(temp)
|
||||
: "memory", "cc");
|
||||
|
||||
return oldval;
|
||||
}
|
||||
|
||||
#define AO_have_test_and_set
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_acquire(volatile AO_TS_t *addr) {
|
||||
AO_TS_VAL_t result = AO_test_and_set(addr);
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_acquire
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_release(volatile AO_TS_t *addr) {
|
||||
AO_lwsync();
|
||||
return AO_test_and_set(addr);
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_release
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr) {
|
||||
AO_TS_VAL_t result;
|
||||
AO_lwsync();
|
||||
result = AO_test_and_set(addr);
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
||||
AO_t oldval;
|
||||
int result = 0;
|
||||
|
||||
__asm__ __volatile__(
|
||||
"1:lwarx %0,0,%2\n" /* load and reserve */
|
||||
"cmpw %0, %4\n" /* if load is not equal to */
|
||||
"bne 2f\n" /* old, fail */
|
||||
"stwcx. %3,0,%2\n" /* else store conditional */
|
||||
"bne- 1b\n" /* retry if lost reservation */
|
||||
"li %1,1\n" /* result = 1; */
|
||||
"2:\n"
|
||||
: "=&r"(oldval), "=&r"(result)
|
||||
: "r"(addr), "r"(new_val), "r"(old), "1"(result)
|
||||
: "memory", "cc");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
||||
int result = AO_compare_and_swap(addr, old, new_val);
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
||||
AO_lwsync();
|
||||
return AO_compare_and_swap(addr, old, new_val);
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
||||
AO_t result;
|
||||
AO_lwsync();
|
||||
result = AO_compare_and_swap(addr, old, new_val);
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_full
|
||||
|
||||
/* FIXME: We should also implement fetch_and_add and or primitives */
|
||||
/* directly. */
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* FIXME: untested. */
|
||||
/* The relevant documentation appears to be at */
|
||||
/* http://publibz.boulder.ibm.com/epubs/pdf/dz9zr003.pdf */
|
||||
/* around page 5-96. Apparently: */
|
||||
/* - Memory references in general are atomic only for a single */
|
||||
/* byte. But it appears that the most common load/store */
|
||||
/* instructions also guarantee atomicity for aligned */
|
||||
/* operands of standard types. WE FOOLISHLY ASSUME that */
|
||||
/* compilers only generate those. If that turns out to be */
|
||||
/* wrong, we need inline assembly code for AO_load and */
|
||||
/* AO_store. */
|
||||
/* - A store followed by a load is unordered since the store */
|
||||
/* may be delayed. Otherwise everything is ordered. */
|
||||
/* - There is a hardware compare-and-swap (CS) instruction. */
|
||||
|
||||
#include "ordered_except_wr.h"
|
||||
#include "all_aligned_atomic_load_store.h"
|
||||
|
||||
#include "../test_and_set_t_is_ao_t.h"
|
||||
/* FIXME: Is there a way to do byte-sized test-and-set? */
|
||||
|
||||
/* FIXME: AO_nop_full should probably be implemented directly. */
|
||||
/* It appears that certain BCR instructions have that effect. */
|
||||
/* Presumably they're cheaper than CS? */
|
||||
|
||||
AO_INLINE AO_t AO_compare_and_swap_full(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
int retval;
|
||||
__asm__ __volatile__ (
|
||||
# ifndef __s390x__
|
||||
" cs %1,%2,0(%3)\n"
|
||||
# else
|
||||
" csg %1,%2,0(%3)\n"
|
||||
# endif
|
||||
" ipm %0\n"
|
||||
" srl %0,28\n"
|
||||
: "=&d" (retval), "+d" (old)
|
||||
: "d" (new_val), "a" (addr)
|
||||
: "cc", "memory");
|
||||
return retval == 0;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_full
|
||||
|
||||
/* FIXME: Add double-wide compare-and-swap for 32-bit executables. */
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* FIXME. Very incomplete. No support for sparc64. */
|
||||
/* Non-ancient SPARCs provide compare-and-swap (casa). */
|
||||
/* We should make that available. */
|
||||
|
||||
#include "../all_atomic_load_store.h"
|
||||
|
||||
/* Real SPARC code uses TSO: */
|
||||
#include "../ordered_except_wr.h"
|
||||
|
||||
/* Test_and_set location is just a byte. */
|
||||
#include "../test_and_set_t_is_char.h"
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr) {
|
||||
int oldval;
|
||||
|
||||
__asm__ __volatile__("ldstub %1,%0"
|
||||
: "=r"(oldval), "=m"(*addr)
|
||||
: "m"(*addr) : "memory");
|
||||
return oldval;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
/* FIXME: This needs to be extended for SPARC v8 and v9. */
|
||||
/* SPARC V8 also has swap. V9 has CAS. */
|
||||
/* There are barriers like membar #LoadStore. */
|
||||
/* CASA (32-bit) and CASXA(64-bit) instructions were */
|
||||
/* added in V9. */
|
||||
@@ -1,153 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Some of the machine specific code was borrowed from our GC distribution.
|
||||
*/
|
||||
|
||||
/* The following really assume we have a 486 or better. Unfortunately */
|
||||
/* gcc doesn't define a suitable feature test macro based on command */
|
||||
/* line options. */
|
||||
/* We should perhaps test dynamically. */
|
||||
|
||||
#include "../all_aligned_atomic_load_store.h"
|
||||
|
||||
/* Real X86 implementations, except for some old WinChips, appear */
|
||||
/* to enforce ordering between memory operations, EXCEPT that a later */
|
||||
/* read can pass earlier writes, presumably due to the visible */
|
||||
/* presence of store buffers. */
|
||||
/* We ignore both the WinChips, and the fact that the official specs */
|
||||
/* seem to be much weaker (and arguably too weak to be usable). */
|
||||
|
||||
#include "../ordered_except_wr.h"
|
||||
|
||||
#include "../test_and_set_t_is_char.h"
|
||||
|
||||
#include "../standard_ao_double_t.h"
|
||||
|
||||
#if defined(AO_USE_PENTIUM4_INSTRS)
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
__asm__ __volatile__("mfence" : : : "memory");
|
||||
}
|
||||
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
#else
|
||||
|
||||
/* We could use the cpuid instruction. But that seems to be slower */
|
||||
/* than the default implementation based on test_and_set_full. Thus */
|
||||
/* we omit that bit of misinformation here. */
|
||||
|
||||
#endif
|
||||
|
||||
/* As far as we can tell, the lfence and sfence instructions are not */
|
||||
/* currently needed or useful for cached memory accesses. */
|
||||
|
||||
/* Really only works for 486 and later */
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
|
||||
{
|
||||
AO_t result;
|
||||
|
||||
__asm__ __volatile__ ("lock; xaddl %0, %1" :
|
||||
"=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
|
||||
: "memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_add_full
|
||||
|
||||
AO_INLINE unsigned char
|
||||
AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
|
||||
{
|
||||
unsigned char result;
|
||||
|
||||
__asm__ __volatile__ ("lock; xaddb %0, %1" :
|
||||
"=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
|
||||
: "memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_fetch_and_add_full
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
|
||||
{
|
||||
unsigned short result;
|
||||
|
||||
__asm__ __volatile__ ("lock; xaddw %0, %1" :
|
||||
"=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
|
||||
: "memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_fetch_and_add_full
|
||||
|
||||
/* Really only works for 486 and later */
|
||||
AO_INLINE void
|
||||
AO_or_full (volatile AO_t *p, AO_t incr)
|
||||
{
|
||||
__asm__ __volatile__ ("lock; orl %1, %0" :
|
||||
"=m" (*p) : "r" (incr), "m" (*p) : "memory");
|
||||
}
|
||||
|
||||
#define AO_HAVE_or_full
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr)
|
||||
{
|
||||
unsigned char oldval;
|
||||
/* Note: the "xchg" instruction does not need a "lock" prefix */
|
||||
__asm__ __volatile__("xchgb %0, %1"
|
||||
: "=r"(oldval), "=m"(*addr)
|
||||
: "0"(0xff), "m"(*addr) : "memory");
|
||||
return (AO_TS_VAL_t)oldval;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
/* Returns nonzero if the comparison succeeded. */
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_full(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
char result;
|
||||
__asm__ __volatile__("lock; cmpxchgl %3, %0; setz %1"
|
||||
: "=m"(*addr), "=q"(result)
|
||||
: "m"(*addr), "r" (new_val), "a"(old) : "memory");
|
||||
return (int) result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_full
|
||||
|
||||
/* Returns nonzero if the comparison succeeded. */
|
||||
/* Really requires at least a Pentium. */
|
||||
AO_INLINE int
|
||||
AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
|
||||
AO_t old_val1, AO_t old_val2,
|
||||
AO_t new_val1, AO_t new_val2)
|
||||
{
|
||||
char result;
|
||||
__asm__ __volatile__("lock; cmpxchg8b %0; setz %1"
|
||||
: "=m"(*addr), "=q"(result)
|
||||
: "m"(*addr), "d" (old_val1), "a" (old_val2),
|
||||
"c" (new_val1), "b" (new_val2) : "memory");
|
||||
return (int) result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_double_compare_and_swap_full
|
||||
|
||||
#include "../ao_t_is_int.h"
|
||||
@@ -1,147 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Some of the machine specific code was borrowed from our GC distribution.
|
||||
*/
|
||||
|
||||
/* The following really assume we have a 486 or better. Unfortunately */
|
||||
/* gcc doesn't define a suitable feature test macro based on command */
|
||||
/* line options. */
|
||||
/* We should perhaps test dynamically. */
|
||||
|
||||
#include "../all_aligned_atomic_load_store.h"
|
||||
|
||||
/* Real X86 implementations, except for some old WinChips, appear */
|
||||
/* to enforce ordering between memory operations, EXCEPT that a later */
|
||||
/* read can pass earlier writes, presumably due to the visible */
|
||||
/* presence of store buffers. */
|
||||
/* We ignore both the WinChips, and the fact that the official specs */
|
||||
/* seem to be much weaker (and arguably too weak to be usable). */
|
||||
|
||||
#include "../ordered_except_wr.h"
|
||||
|
||||
#include "../test_and_set_t_is_char.h"
|
||||
|
||||
#if defined(AO_USE_PENTIUM4_INSTRS)
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
__asm__ __volatile__("mfence" : : : "memory");
|
||||
}
|
||||
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
#else
|
||||
|
||||
/* We could use the cpuid instruction. But that seems to be slower */
|
||||
/* than the default implementation based on test_and_set_full. Thus */
|
||||
/* we omit that bit of misinformation here. */
|
||||
|
||||
#endif
|
||||
|
||||
/* As far as we can tell, the lfence and sfence instructions are not */
|
||||
/* currently needed or useful for cached memory accesses. */
|
||||
|
||||
/* Really only works for 486 and later */
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
|
||||
{
|
||||
AO_t result;
|
||||
|
||||
__asm__ __volatile__ ("lock; xaddq %0, %1" :
|
||||
"=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
|
||||
: "memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_add_full
|
||||
|
||||
AO_INLINE unsigned char
|
||||
AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
|
||||
{
|
||||
unsigned char result;
|
||||
|
||||
__asm__ __volatile__ ("lock; xaddb %0, %1" :
|
||||
"=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
|
||||
: "memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_fetch_and_add_full
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
|
||||
{
|
||||
unsigned short result;
|
||||
|
||||
__asm__ __volatile__ ("lock; xaddw %0, %1" :
|
||||
"=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
|
||||
: "memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_fetch_and_add_full
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr)
|
||||
{
|
||||
unsigned int result;
|
||||
|
||||
__asm__ __volatile__ ("lock; xaddl %0, %1" :
|
||||
"=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
|
||||
: "memory");
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_fetch_and_add_full
|
||||
|
||||
/* Really only works for 486 and later */
|
||||
AO_INLINE void
|
||||
AO_or_full (volatile AO_t *p, AO_t incr)
|
||||
{
|
||||
__asm__ __volatile__ ("lock; orq %1, %0" :
|
||||
"=m" (*p) : "r" (incr), "m" (*p) : "memory");
|
||||
}
|
||||
|
||||
#define AO_HAVE_or_full
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr)
|
||||
{
|
||||
unsigned char oldval;
|
||||
/* Note: the "xchg" instruction does not need a "lock" prefix */
|
||||
__asm__ __volatile__("xchgb %0, %1"
|
||||
: "=r"(oldval), "=m"(*addr)
|
||||
: "0"(0xff), "m"(*addr) : "memory");
|
||||
return (AO_TS_VAL_t)oldval;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
/* Returns nonzero if the comparison succeeded. */
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_full(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
char result;
|
||||
__asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1"
|
||||
: "=m"(*addr), "=q"(result)
|
||||
: "m"(*addr), "r" (new_val), "a"(old) : "memory");
|
||||
return (int) result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_full
|
||||
|
||||
/* FIXME: The Intel version has a 16byte CAS instruction. */
|
||||
@@ -1,289 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* The following is useful primarily for debugging and documentation. */
|
||||
/* We define various atomic operations by acquiring a global pthread */
|
||||
/* lock. The resulting implementation will perform poorly, but should */
|
||||
/* be correct unless it is used from signal handlers. */
|
||||
/* We assume that all pthread operations act like full memory barriers. */
|
||||
/* (We believe that is the intent of the specification.) */
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "test_and_set_t_is_ao_t.h"
|
||||
/* This is not necessarily compatible with the native */
|
||||
/* implementation. But those can't be safely mixed anyway. */
|
||||
|
||||
/* We define only the full barrier variants, and count on the */
|
||||
/* generalization section below to fill in the rest. */
|
||||
extern pthread_mutex_t AO_pt_lock;
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
}
|
||||
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_load_full(volatile AO_t *addr)
|
||||
{
|
||||
AO_t result;
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
result = *addr;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_load_full
|
||||
|
||||
AO_INLINE void
|
||||
AO_store_full(volatile AO_t *addr, AO_t val)
|
||||
{
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
*addr = val;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
}
|
||||
|
||||
#define AO_HAVE_store_full
|
||||
|
||||
AO_INLINE unsigned char
|
||||
AO_char_load_full(volatile unsigned char *addr)
|
||||
{
|
||||
unsigned char result;
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
result = *addr;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_load_full
|
||||
|
||||
AO_INLINE void
|
||||
AO_char_store_full(volatile unsigned char *addr, unsigned char val)
|
||||
{
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
*addr = val;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_store_full
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_short_load_full(volatile unsigned short *addr)
|
||||
{
|
||||
unsigned short result;
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
result = *addr;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_load_full
|
||||
|
||||
AO_INLINE void
|
||||
AO_short_store_full(volatile unsigned short *addr, unsigned short val)
|
||||
{
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
*addr = val;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_store_full
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_load_full(volatile unsigned int *addr)
|
||||
{
|
||||
unsigned int result;
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
result = *addr;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_load_full
|
||||
|
||||
AO_INLINE void
|
||||
AO_int_store_full(volatile unsigned int *addr, unsigned int val)
|
||||
{
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
*addr = val;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_store_full
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr)
|
||||
{
|
||||
AO_TS_VAL_t result;
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
result = (AO_TS_VAL_t)(*addr);
|
||||
*addr = AO_TS_SET;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
assert(result == AO_TS_SET || result == AO_TS_CLEAR);
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
|
||||
{
|
||||
AO_t tmp;
|
||||
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
tmp = *p;
|
||||
*p = tmp + incr;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_add_full
|
||||
|
||||
AO_INLINE unsigned char
|
||||
AO_char_fetch_and_add_full(volatile unsigned char *p, unsigned char incr)
|
||||
{
|
||||
unsigned char tmp;
|
||||
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
tmp = *p;
|
||||
*p = tmp + incr;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_fetch_and_add_full
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_short_fetch_and_add_full(volatile unsigned short *p, unsigned short incr)
|
||||
{
|
||||
unsigned short tmp;
|
||||
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
tmp = *p;
|
||||
*p = tmp + incr;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_fetch_and_add_full
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_fetch_and_add_full(volatile unsigned int *p, unsigned int incr)
|
||||
{
|
||||
unsigned int tmp;
|
||||
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
tmp = *p;
|
||||
*p = tmp + incr;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_fetch_and_add_full
|
||||
|
||||
AO_INLINE void
|
||||
AO_or_full(volatile AO_t *p, AO_t incr)
|
||||
{
|
||||
AO_t tmp;
|
||||
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
tmp = *p;
|
||||
*p = (tmp | incr);
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
}
|
||||
|
||||
#define AO_HAVE_or_full
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_full(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
if (*addr == old)
|
||||
{
|
||||
*addr = new_val;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_full
|
||||
|
||||
/* Unlike real architectures, we define both double-width CAS variants. */
|
||||
|
||||
typedef struct {
|
||||
AO_t AO_val1;
|
||||
AO_t AO_val2;
|
||||
} AO_double_t;
|
||||
|
||||
#define AO_HAVE_double_t
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
|
||||
AO_t old1, AO_t old2,
|
||||
AO_t new1, AO_t new2)
|
||||
{
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
if (addr -> AO_val1 == old1 && addr -> AO_val2 == old2)
|
||||
{
|
||||
addr -> AO_val1 = new1;
|
||||
addr -> AO_val2 = new2;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_double_and_swap_double_full
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_double_full(volatile AO_double_t *addr,
|
||||
AO_t old1,
|
||||
AO_t new1, AO_t new2)
|
||||
{
|
||||
pthread_mutex_lock(&AO_pt_lock);
|
||||
if (addr -> AO_val1 == old1)
|
||||
{
|
||||
addr -> AO_val1 = new1;
|
||||
addr -> AO_val2 = new2;
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
pthread_mutex_unlock(&AO_pt_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_double_full
|
||||
|
||||
/* We can't use hardware loads and stores, since they don't */
|
||||
/* interact correctly with atomic updates. */
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Derived from the corresponsing header file for gcc.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../atomic_load_store.h"
|
||||
|
||||
/* Some architecture set descriptions include special "ordered" memory */
|
||||
/* operations. As far as we can tell, no existing processors actually */
|
||||
/* require those. Nor does it appear likely that future processors */
|
||||
/* will. */
|
||||
/* FIXME: */
|
||||
/* The PA emulator on Itanium may obey weaker restrictions. */
|
||||
/* There should be a mode in which we don't assume sequential */
|
||||
/* consistency here. */
|
||||
#include "../ordered.h"
|
||||
|
||||
#include <machine/inline.h>
|
||||
|
||||
/* GCC will not guarantee the alignment we need, use four lock words */
|
||||
/* and select the correctly aligned datum. See the glibc 2.3.2 */
|
||||
/* linuxthread port for the original implementation. */
|
||||
struct AO_pa_clearable_loc {
|
||||
int data[4];
|
||||
};
|
||||
|
||||
#undef AO_TS_INITIALIZER
|
||||
#define AO_TS_t struct AO_pa_clearable_loc
|
||||
#define AO_TS_INITIALIZER {1,1,1,1}
|
||||
/* Switch meaning of set and clear, since we only have an atomic clear */
|
||||
/* instruction. */
|
||||
typedef enum {AO_PA_TS_set = 0, AO_PA_TS_clear = 1} AO_PA_TS_val;
|
||||
#define AO_TS_VAL_t AO_PA_TS_val
|
||||
#define AO_TS_CLEAR AO_PA_TS_clear
|
||||
#define AO_TS_SET AO_PA_TS_set
|
||||
|
||||
/* The hppa only has one atomic read and modify memory operation, */
|
||||
/* load and clear, so hppa spinlocks must use zero to signify that */
|
||||
/* someone is holding the lock. The address used for the ldcw */
|
||||
/* semaphore must be 16-byte aligned. */
|
||||
|
||||
#define __ldcw(a, ret) \
|
||||
_LDCWX(0 /* index */, 0 /* s */, a /* base */, ret);
|
||||
|
||||
/* Because malloc only guarantees 8-byte alignment for malloc'd data, */
|
||||
/* and GCC only guarantees 8-byte alignment for stack locals, we can't */
|
||||
/* be assured of 16-byte alignment for atomic lock data even if we */
|
||||
/* specify "__attribute ((aligned(16)))" in the type declaration. So, */
|
||||
/* we use a struct containing an array of four ints for the atomic lock */
|
||||
/* type and dynamically select the 16-byte aligned int from the array */
|
||||
/* for the semaphore. */
|
||||
#define __PA_LDCW_ALIGNMENT 16
|
||||
|
||||
#define __ldcw_align(a, ret) { \
|
||||
ret = (unsigned long) a; \
|
||||
ret += __PA_LDCW_ALIGNMENT - 1; \
|
||||
ret &= ~(__PA_LDCW_ALIGNMENT - 1); \
|
||||
}
|
||||
|
||||
/* Works on PA 1.1 and PA 2.0 systems */
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t * addr)
|
||||
{
|
||||
register unsigned int ret;
|
||||
register unsigned long a;
|
||||
__ldcw_align (addr, a);
|
||||
__ldcw (a, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
AO_INLINE void
|
||||
AO_pa_clear(volatile AO_TS_t * addr)
|
||||
{
|
||||
unsigned long a;
|
||||
__ldcw_align (addr,a);
|
||||
AO_compiler_barrier();
|
||||
*(volatile unsigned int *)a = 1;
|
||||
}
|
||||
#define AO_CLEAR(addr) AO_pa_clear(addr)
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file specifies Itanimum primitives for use with the HP compiler
|
||||
* unde HP/UX. We use intrinsics instead of the inline assembly code in the
|
||||
* gcc file.
|
||||
*/
|
||||
|
||||
#include "../atomic_load_store.h"
|
||||
|
||||
#include "../acquire_release_volatile.h"
|
||||
|
||||
#include "../test_and_set_t_is_char.h"
|
||||
|
||||
#include <machine/sys/inline.h>
|
||||
|
||||
#ifdef __LP64__
|
||||
# define AO_T_FASIZE _FASZ_D
|
||||
# define AO_T_SIZE _SZ_D
|
||||
#else
|
||||
# define AO_T_FASIZE _FASZ_W
|
||||
# define AO_T_SIZE _SZ_W
|
||||
#endif
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
_Asm_mf();
|
||||
}
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add1_acquire (volatile AO_t *p)
|
||||
{
|
||||
return _Asm_fetchadd(AO_T_FASIZE, _SEM_ACQ, p, 1,
|
||||
_LDHINT_NONE, _DOWN_MEM_FENCE);
|
||||
}
|
||||
#define AO_HAVE_fetch_and_add1_acquire
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add1_release (volatile AO_t *p)
|
||||
{
|
||||
return _Asm_fetchadd(AO_T_FASIZE, _SEM_REL, p, 1,
|
||||
_LDHINT_NONE, _UP_MEM_FENCE);
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_add1_release
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_sub1_acquire (volatile AO_t *p)
|
||||
{
|
||||
return _Asm_fetchadd(AO_T_FASIZE, _SEM_ACQ, p, -1,
|
||||
_LDHINT_NONE, _DOWN_MEM_FENCE);
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_sub1_acquire
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_sub1_release (volatile AO_t *p)
|
||||
{
|
||||
return _Asm_fetchadd(AO_T_FASIZE, _SEM_REL, p, -1,
|
||||
_LDHINT_NONE, _UP_MEM_FENCE);
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_sub1_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_acquire(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
AO_t oldval;
|
||||
|
||||
_Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
|
||||
oldval = _Asm_cmpxchg(AO_T_SIZE, _SEM_ACQ, addr,
|
||||
new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_release(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
AO_t oldval;
|
||||
_Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
|
||||
oldval = _Asm_cmpxchg(AO_T_SIZE, _SEM_REL, addr,
|
||||
new_val, _LDHINT_NONE, _UP_MEM_FENCE);
|
||||
/* Hopefully the compiler knows not to reorder the above two? */
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
|
||||
unsigned char old, unsigned char new_val)
|
||||
{
|
||||
unsigned char oldval;
|
||||
|
||||
_Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
|
||||
oldval = _Asm_cmpxchg(_SZ_B, _SEM_ACQ, addr,
|
||||
new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_char_compare_and_swap_release(volatile unsigned char *addr,
|
||||
unsigned char old, unsigned char new_val)
|
||||
{
|
||||
insigned char oldval;
|
||||
_Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
|
||||
oldval = _Asm_cmpxchg(_SZ_B, _SEM_REL, addr,
|
||||
new_val, _LDHINT_NONE, _UP_MEM_FENCE);
|
||||
/* Hopefully the compiler knows not to reorder the above two? */
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_compare_and_swap_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
|
||||
unsigned short old, unsigned short new_val)
|
||||
{
|
||||
unsigned short oldval;
|
||||
|
||||
_Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
|
||||
oldval = _Asm_cmpxchg(_SZ_B, _SEM_ACQ, addr,
|
||||
new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_short_compare_and_swap_release(volatile unsigned short *addr,
|
||||
unsigned short old, unsigned short new_val)
|
||||
{
|
||||
insigned short oldval;
|
||||
_Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
|
||||
oldval = _Asm_cmpxchg(_SZ_B, _SEM_REL, addr,
|
||||
new_val, _LDHINT_NONE, _UP_MEM_FENCE);
|
||||
/* Hopefully the compiler knows not to reorder the above two? */
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_compare_and_swap_release
|
||||
|
||||
#ifndef __LP64__
|
||||
# include "ao_t_is_int.h"
|
||||
#endif
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
/* FIXME. This is only a placeholder for the AIX compiler. */
|
||||
/* It doesn't work. Please send a patch. */
|
||||
/* Memory model documented at http://www-106.ibm.com/developerworks/ */
|
||||
/* eserver/articles/archguide.html and (clearer) */
|
||||
/* http://www-106.ibm.com/developerworks/eserver/articles/powerpc.html. */
|
||||
/* There appears to be no implicit ordering between any kind of */
|
||||
/* independent memory references. */
|
||||
/* Architecture enforces some ordering based on control dependence. */
|
||||
/* I don't know if that could help. */
|
||||
/* Data-dependent loads are always ordered. */
|
||||
/* Based on the above references, eieio is intended for use on */
|
||||
/* uncached memory, which we don't support. It does not order loads */
|
||||
/* from cached memory. */
|
||||
/* Thanks to Maged Michael, Doug Lea, and Roger Hoover for helping to */
|
||||
/* track some of this down and correcting my misunderstandings. -HB */
|
||||
|
||||
#include "../all_aligned_atomic_load_store.h"
|
||||
|
||||
void AO_sync(void);
|
||||
#pragma mc_func AO_sync { "7c0004ac" }
|
||||
|
||||
void AO_lwsync(void);
|
||||
#pragma mc_func AO_lwsync { "7c2004ac" }
|
||||
|
||||
#define AO_nop_write() AO_lwsync()
|
||||
#define AO_HAVE_nop_write
|
||||
|
||||
#define AO_nop_read() AO_lwsync()
|
||||
#define AO_HAVE_nop_read
|
||||
|
||||
/* We explicitly specify load_acquire and store_release, since these */
|
||||
/* rely on the fact that lwsync is also a LoadStore barrier. */
|
||||
AO_INLINE AO_t
|
||||
AO_load_acquire(volatile AO_t *addr)
|
||||
{
|
||||
AO_t result = *addr;
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_store_release(volatile AO_t *addr, AO_t value)
|
||||
{
|
||||
AO_lwsync();
|
||||
*addr = value;
|
||||
}
|
||||
|
||||
#define AO_HAVE_load_acquire
|
||||
|
||||
/* This is similar to the code in the garbage collector. Deleting */
|
||||
/* this and having it synthesized from compare_and_swap would probably */
|
||||
/* only cost us a load immediate instruction. */
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set(volatile AO_TS_t *addr) {
|
||||
# error Implement me
|
||||
}
|
||||
|
||||
#define AO_have_test_and_set
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_acquire(volatile AO_TS_t *addr) {
|
||||
AO_TS_VAL_t result = AO_test_and_set(addr);
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_acquire
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_release(volatile AO_TS_t *addr) {
|
||||
AO_lwsync();
|
||||
return AO_test_and_set(addr);
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_release
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr) {
|
||||
AO_TS_VAL_t result;
|
||||
AO_lwsync();
|
||||
result = AO_test_and_set(addr);
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
||||
# error Implement me
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
||||
AO_t result = AO_compare_and_swap(addr, old, new_val);
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
||||
AO_lwsync();
|
||||
return AO_compare_and_swap(addr, old, new_val);
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_release
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
||||
AO_t result;
|
||||
AO_lwsync();
|
||||
result = AO_compare_and_swap(addr, old, new_val);
|
||||
AO_lwsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_full
|
||||
|
||||
/* FIXME: We should also implement fetch_and_add and or primitives */
|
||||
/* directly. */
|
||||
@@ -1,225 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file specifies Itanimum primitives for use with the Intel (ecc)
|
||||
* compiler. We use intrinsics instead of the inline assembly code in the
|
||||
* gcc file.
|
||||
*/
|
||||
|
||||
#include "../all_atomic_load_store.h"
|
||||
|
||||
#include "../test_and_set_t_is_char.h"
|
||||
|
||||
#include <ia64intrin.h>
|
||||
|
||||
/* The acquire release semantics of volatile can be turned off. And volatile */
|
||||
/* operations in icc9 don't imply ordering with respect to other nonvolatile */
|
||||
/* operations. */
|
||||
|
||||
#define AO_INTEL_PTR_t void *
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_load_acquire(volatile AO_t *p)
|
||||
{
|
||||
return (AO_t)(__ld8_acq((AO_INTEL_PTR_t)p));
|
||||
}
|
||||
#define AO_HAVE_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_store_release(volatile AO_t *p, AO_t val)
|
||||
{
|
||||
__st8_rel((AO_INTEL_PTR_t)p, (__int64)val);
|
||||
}
|
||||
#define AO_HAVE_store_release
|
||||
|
||||
AO_INLINE unsigned char
|
||||
AO_char_load_acquire(volatile unsigned char *p)
|
||||
{
|
||||
/* A normal volatile load generates an ld.acq */
|
||||
return (__ld1_acq((AO_INTEL_PTR_t)p));
|
||||
}
|
||||
#define AO_HAVE_char_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_char_store_release(volatile unsigned char *p, unsigned char val)
|
||||
{
|
||||
__st1_rel((AO_INTEL_PTR_t)p, val);
|
||||
}
|
||||
#define AO_HAVE_char_store_release
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_short_load_acquire(volatile unsigned short *p)
|
||||
{
|
||||
/* A normal volatile load generates an ld.acq */
|
||||
return (__ld2_acq((AO_INTEL_PTR_t)p));
|
||||
}
|
||||
#define AO_HAVE_short_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_short_store_release(volatile unsigned short *p, unsigned short val)
|
||||
{
|
||||
__st2_rel((AO_INTEL_PTR_t)p, val);
|
||||
}
|
||||
#define AO_HAVE_short_store_release
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_load_acquire(volatile unsigned int *p)
|
||||
{
|
||||
/* A normal volatile load generates an ld.acq */
|
||||
return (__ld4_acq((AO_INTEL_PTR_t)p));
|
||||
}
|
||||
#define AO_HAVE_int_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_int_store_release(volatile unsigned int *p, unsigned int val)
|
||||
{
|
||||
__st4_rel((AO_INTEL_PTR_t)p, val);
|
||||
}
|
||||
#define AO_HAVE_int_store_release
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
__mf();
|
||||
}
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add1_acquire (volatile AO_t *p)
|
||||
{
|
||||
return __fetchadd8_acq((unsigned __int64 *)p, 1);
|
||||
}
|
||||
#define AO_HAVE_fetch_and_add1_acquire
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add1_release (volatile AO_t *p)
|
||||
{
|
||||
return __fetchadd8_rel((unsigned __int64 *)p, 1);
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_add1_release
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_sub1_acquire (volatile AO_t *p)
|
||||
{
|
||||
return __fetchadd8_acq((unsigned __int64 *)p, -1);
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_sub1_acquire
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_sub1_release (volatile AO_t *p)
|
||||
{
|
||||
return __fetchadd8_rel((unsigned __int64 *)p, -1);
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_sub1_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_acquire(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
AO_t oldval;
|
||||
oldval = _InterlockedCompareExchange64_acq(addr, new_val, old);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_release(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
AO_t oldval;
|
||||
oldval = _InterlockedCompareExchange64_rel(addr, new_val, old);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
|
||||
unsigned char old, unsigned char new_val)
|
||||
{
|
||||
unsigned char oldval;
|
||||
oldval = _InterlockedCompareExchange8_acq(addr, new_val, old);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_char_compare_and_swap_release(volatile unsigned char *addr,
|
||||
unsigned char old, unsigned char new_val)
|
||||
{
|
||||
unsigned char oldval;
|
||||
oldval = _InterlockedCompareExchange8_rel(addr, new_val, old);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_char_compare_and_swap_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
|
||||
unsigned short old, unsigned short new_val)
|
||||
{
|
||||
unsigned short oldval;
|
||||
oldval = _InterlockedCompareExchange16_acq(addr, new_val, old);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_short_compare_and_swap_release(volatile unsigned short *addr,
|
||||
unsigned short old, unsigned short new_val)
|
||||
{
|
||||
unsigned short oldval;
|
||||
oldval = _InterlockedCompareExchange16_rel(addr, new_val, old);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_compare_and_swap_release
|
||||
|
||||
AO_INLINE int
|
||||
AO_int_compare_and_swap_acquire(volatile unsigned int *addr,
|
||||
unsigned int old, unsigned int new_val)
|
||||
{
|
||||
unsigned int oldval;
|
||||
oldval = _InterlockedCompareExchange_acq(addr, new_val, old);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_compare_and_swap_acquire
|
||||
|
||||
AO_INLINE int
|
||||
AO_int_compare_and_swap_release(volatile unsigned int *addr,
|
||||
unsigned int old, unsigned int new_val)
|
||||
{
|
||||
unsigned int oldval;
|
||||
oldval = _InterlockedCompareExchange_rel(addr, new_val, old);
|
||||
return (oldval == old);
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_compare_and_swap_release
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file adds definitions appropriate for environments in which an unsigned
|
||||
* int volatile load has acquire semantics, and an unsigned short volatile
|
||||
* store has release semantics. This is true with the standard Itanium ABI.
|
||||
*/
|
||||
#if !defined(AO_GCC_BARRIER)
|
||||
# if defined(__GNUC__)
|
||||
# define AO_GCC_BARRIER() AO_compiler_barrier()
|
||||
# else
|
||||
# define AO_GCC_BARRIER()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_load_acquire(volatile unsigned int *p)
|
||||
{
|
||||
unsigned int result = *p;
|
||||
/* A normal volatile load generates an ld.acq */
|
||||
AO_GCC_BARRIER();
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_int_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_int_store_release(volatile unsigned int *p, unsigned int val)
|
||||
{
|
||||
AO_GCC_BARRIER();
|
||||
/* A normal volatile store generates an st.rel */
|
||||
*p = val;
|
||||
}
|
||||
#define AO_HAVE_int_store_release
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions for architecturs on which loads and stores of unsigned int are
|
||||
* atomic fo all legal alignments.
|
||||
*/
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_load(volatile unsigned int *addr)
|
||||
{
|
||||
assert(((unsigned long)addr & (sizeof(unsigned int) - 1)) == 0);
|
||||
/* Cast away the volatile for architectures like IA64 where */
|
||||
/* volatile adds barrier semantics. */
|
||||
return (*(unsigned int *)addr);
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_load
|
||||
|
||||
AO_INLINE void
|
||||
AO_int_store(volatile unsigned int *addr, unsigned int new_val)
|
||||
{
|
||||
assert(((unsigned long)addr & (sizeof(unsigned int) - 1)) == 0);
|
||||
(*(unsigned int *)addr) = new_val;
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_store
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions for architecturs on which loads and stores of unsigned int are
|
||||
* atomic for all legal alignments.
|
||||
*/
|
||||
|
||||
AO_INLINE unsigned int
|
||||
AO_int_load(volatile unsigned int *addr)
|
||||
{
|
||||
/* Cast away the volatile for architectures like IA64 where */
|
||||
/* volatile adds barrier semantics. */
|
||||
return (*(unsigned int *)addr);
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_load
|
||||
|
||||
AO_INLINE void
|
||||
AO_int_store(volatile unsigned int *addr, unsigned int new_val)
|
||||
{
|
||||
(*(unsigned int *)addr) = new_val;
|
||||
}
|
||||
|
||||
#define AO_HAVE_int_store
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* The following really assume we have a 486 or better. */
|
||||
/* If ASSUME_WINDOWS98 is defined, we assume Windows 98 or newer. */
|
||||
|
||||
#include "../aligned_atomic_load_store.h"
|
||||
|
||||
/* Real X86 implementations, except for some old WinChips, appear */
|
||||
/* to enforce ordering between memory operations, EXCEPT that a later */
|
||||
/* read can pass earlier writes, presumably due to the visible */
|
||||
/* presence of store buffers. */
|
||||
/* We ignore both the WinChips, and the fact that the official specs */
|
||||
/* seem to be much weaker (and arguably too weak to be usable). */
|
||||
|
||||
#include "../ordered_except_wr.h"
|
||||
|
||||
#include "../test_and_set_t_is_ao_t.h"
|
||||
/* We should use byte-sized test-and-set locations, as with */
|
||||
/* gcc. But I couldn't find the appropriate compiler */
|
||||
/* intrinsic. - HB */
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
/* As far as we can tell, the lfence and sfence instructions are not */
|
||||
/* currently needed or useful for cached memory accesses. */
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_add1_full (volatile AO_t *p)
|
||||
{
|
||||
return InterlockedIncrement((LONG volatile *)p) - 1;
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_add1_full
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_fetch_and_sub1_full (volatile AO_t *p)
|
||||
{
|
||||
return InterlockedDecrement((LONG volatile *)p) + 1;
|
||||
}
|
||||
|
||||
#define AO_HAVE_fetch_and_sub1_full
|
||||
|
||||
AO_INLINE AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr)
|
||||
{
|
||||
return (AO_TS_VAL_t) InterlockedExchange((LONG volatile *)addr,
|
||||
(LONG)AO_TS_SET);
|
||||
}
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
#ifdef AO_ASSUME_WINDOWS98
|
||||
/* Returns nonzero if the comparison succeeded. */
|
||||
AO_INLINE int
|
||||
AO_compare_and_swap_full(volatile AO_t *addr,
|
||||
AO_t old, AO_t new_val)
|
||||
{
|
||||
# if 0
|
||||
/* Use the pointer variant, since that should always have the right size. */
|
||||
/* This seems to fail with VC++ 6 on Win2000 because the routine isn't */
|
||||
/* actually there. */
|
||||
return InterlockedCompareExchangePointer((PVOID volatile *)addr,
|
||||
(PVOID)new_val, (PVOID) old)
|
||||
== (PVOID)old;
|
||||
# endif
|
||||
/* FIXME - This is nearly useless on win64. */
|
||||
/* Use InterlockedCompareExchange64 for win64? */
|
||||
return InterlockedCompareExchange((DWORD volatile *)addr,
|
||||
(DWORD)new_val, (DWORD) old)
|
||||
== (DWORD)old;
|
||||
}
|
||||
|
||||
#define AO_HAVE_compare_and_swap_full
|
||||
#endif /* ASSUME_WINDOWS98 */
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* These are common definitions for architectures that provide processor
|
||||
* ordered memory operations.
|
||||
*/
|
||||
|
||||
#include "ordered_except_wr.h"
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_full()
|
||||
{
|
||||
AO_compiler_barrier();
|
||||
}
|
||||
|
||||
#define AO_HAVE_nop_full
|
||||
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* These are common definitions for architectures that provide processor
|
||||
* ordered memory operations except that a later read may pass an
|
||||
* earlier write. Real x86 implementations seem to be in this category,
|
||||
* except apparently for some IDT WinChips, which we ignore.
|
||||
*/
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_write()
|
||||
{
|
||||
AO_compiler_barrier();
|
||||
/* sfence according to Intel docs. Pentium 3 and up. */
|
||||
/* Unnecessary for cached accesses? */
|
||||
}
|
||||
|
||||
#define AO_HAVE_NOP_WRITE
|
||||
|
||||
AO_INLINE void
|
||||
AO_nop_read()
|
||||
{
|
||||
AO_compiler_barrier();
|
||||
}
|
||||
|
||||
#define AO_HAVE_NOP_READ
|
||||
|
||||
#ifdef AO_HAVE_load
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_load_read(volatile AO_t *addr)
|
||||
{
|
||||
AO_t result = AO_load(addr);
|
||||
AO_compiler_barrier();
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_load_read
|
||||
|
||||
#define AO_load_acquire(addr) AO_load_read(addr)
|
||||
#define AO_HAVE_load_acquire
|
||||
|
||||
#endif /* AO_HAVE_load */
|
||||
|
||||
#ifdef AO_HAVE_char_load
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_char_load_read(volatile unsigned char *addr)
|
||||
{
|
||||
AO_t result = AO_char_load(addr);
|
||||
AO_compiler_barrier();
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_char_load_read
|
||||
|
||||
#define AO_char_load_acquire(addr) AO_char_load_read(addr)
|
||||
#define AO_HAVE_char_load_acquire
|
||||
|
||||
#endif /* AO_HAVE_char_load */
|
||||
|
||||
#ifdef AO_HAVE_short_load
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_short_load_read(volatile unsigned short *addr)
|
||||
{
|
||||
AO_t result = AO_short_load(addr);
|
||||
AO_compiler_barrier();
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_short_load_read
|
||||
|
||||
#define AO_short_load_acquire(addr) AO_short_load_read(addr)
|
||||
#define AO_HAVE_short_load_acquire
|
||||
|
||||
#endif /* AO_HAVE_short_load */
|
||||
|
||||
#ifdef AO_HAVE_int_load
|
||||
|
||||
AO_INLINE AO_t
|
||||
AO_int_load_read(volatile unsigned int *addr)
|
||||
{
|
||||
AO_t result = AO_int_load(addr);
|
||||
AO_compiler_barrier();
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_int_load_read
|
||||
|
||||
#define AO_int_load_acquire(addr) AO_int_load_read(addr)
|
||||
#define AO_HAVE_int_load_acquire
|
||||
|
||||
#endif /* AO_HAVE_int_load */
|
||||
|
||||
#if defined(AO_HAVE_store)
|
||||
|
||||
AO_INLINE void
|
||||
AO_store_write(volatile AO_t *addr, AO_t val)
|
||||
{
|
||||
AO_compiler_barrier();
|
||||
AO_store(addr, val);
|
||||
}
|
||||
# define AO_HAVE_store_write
|
||||
|
||||
# define AO_store_release(addr, val) AO_store_write(addr, val)
|
||||
# define AO_HAVE_store_release
|
||||
|
||||
#endif /* AO_HAVE_store */
|
||||
|
||||
#if defined(AO_HAVE_char_store)
|
||||
|
||||
AO_INLINE void
|
||||
AO_char_store_write(volatile unsigned char *addr, unsigned char val)
|
||||
{
|
||||
AO_compiler_barrier();
|
||||
AO_char_store(addr, val);
|
||||
}
|
||||
# define AO_HAVE_char_store_write
|
||||
|
||||
# define AO_char_store_release(addr, val) AO_char_store_write(addr, val)
|
||||
# define AO_HAVE_char_store_release
|
||||
|
||||
#endif /* AO_HAVE_char_store */
|
||||
|
||||
#if defined(AO_HAVE_short_store)
|
||||
|
||||
AO_INLINE void
|
||||
AO_short_store_write(volatile unsigned short *addr, unsigned short val)
|
||||
{
|
||||
AO_compiler_barrier();
|
||||
AO_short_store(addr, val);
|
||||
}
|
||||
# define AO_HAVE_short_store_write
|
||||
|
||||
# define AO_short_store_release(addr, val) AO_short_store_write(addr, val)
|
||||
# define AO_HAVE_short_store_release
|
||||
|
||||
#endif /* AO_HAVE_short_store */
|
||||
|
||||
#if defined(AO_HAVE_int_store)
|
||||
|
||||
AO_INLINE void
|
||||
AO_int_store_write(volatile unsigned int *addr, unsigned int val)
|
||||
{
|
||||
AO_compiler_barrier();
|
||||
AO_int_store(addr, val);
|
||||
}
|
||||
# define AO_HAVE_int_store_write
|
||||
|
||||
# define AO_int_store_release(addr, val) AO_int_store_write(addr, val)
|
||||
# define AO_HAVE_int_store_release
|
||||
|
||||
#endif /* AO_HAVE_int_store */
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file adds definitions appropriate for environments in which an unsigned short
|
||||
* volatile load has acquire semantics, and an unsigned short volatile store has release
|
||||
* semantics. This is true with the standard Itanium ABI.
|
||||
*/
|
||||
#if !defined(AO_GCC_BARRIER)
|
||||
# if defined(__GNUC__)
|
||||
# define AO_GCC_BARRIER() AO_compiler_barrier()
|
||||
# else
|
||||
# define AO_GCC_BARRIER()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_short_load_acquire(volatile unsigned short *p)
|
||||
{
|
||||
unsigned short result = *p;
|
||||
/* A normal volatile load generates an ld.acq */
|
||||
AO_GCC_BARRIER();
|
||||
return result;
|
||||
}
|
||||
#define AO_HAVE_short_load_acquire
|
||||
|
||||
AO_INLINE void
|
||||
AO_short_store_release(volatile unsigned short *p, unsigned short val)
|
||||
{
|
||||
AO_GCC_BARRIER();
|
||||
/* A normal volatile store generates an st.rel */
|
||||
*p = val;
|
||||
}
|
||||
#define AO_HAVE_short_store_release
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions for architecturs on which loads and stores of unsigned short are
|
||||
* atomic fo all legal alignments.
|
||||
*/
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_short_load(volatile unsigned short *addr)
|
||||
{
|
||||
assert(((unsigned long)addr & (sizeof(unsigned short) - 1)) == 0);
|
||||
/* Cast away the volatile for architectures like IA64 where */
|
||||
/* volatile adds barrier semantics. */
|
||||
return (*(unsigned short *)addr);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_load
|
||||
|
||||
AO_INLINE void
|
||||
AO_short_store(volatile unsigned short *addr, unsigned short new_val)
|
||||
{
|
||||
assert(((unsigned long)addr & (sizeof(unsigned short) - 1)) == 0);
|
||||
(*(unsigned short *)addr) = new_val;
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_store
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions for architecturs on which loads and stores of unsigned short are
|
||||
* atomic for all legal alignments.
|
||||
*/
|
||||
|
||||
AO_INLINE unsigned short
|
||||
AO_short_load(volatile unsigned short *addr)
|
||||
{
|
||||
/* Cast away the volatile for architectures like IA64 where */
|
||||
/* volatile adds barrier semantics. */
|
||||
return (*(unsigned short *)addr);
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_load
|
||||
|
||||
AO_INLINE void
|
||||
AO_short_store(volatile unsigned short *addr, unsigned short new_val)
|
||||
{
|
||||
(*(unsigned short *)addr) = new_val;
|
||||
}
|
||||
|
||||
#define AO_HAVE_short_store
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
typedef union {
|
||||
unsigned long long AO_whole;
|
||||
struct {AO_t AO_v1; AO_t AO_v2;} AO_parts;
|
||||
} AO_double_t;
|
||||
#define AO_HAVE_double_t
|
||||
#define AO_val1 AO_parts.AO_v1
|
||||
#define AO_val2 AO_parts.AO_v2
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
.seg "text"
|
||||
.globl AO_test_and_set_full
|
||||
AO_test_and_set_full:
|
||||
retl
|
||||
ldstub [%o0],%o0
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "../all_atomic_load_store.h"
|
||||
|
||||
/* Real SPARC code uses TSO: */
|
||||
#include "../ordered_except_wr.h"
|
||||
|
||||
/* Test_and_set location is just a byte. */
|
||||
#include "../test_and_set_t_is_char.h"
|
||||
|
||||
extern AO_TS_VAL_t
|
||||
AO_test_and_set_full(volatile AO_TS_t *addr);
|
||||
/* Implemented in separate .S file, for now. */
|
||||
|
||||
#define AO_HAVE_test_and_set_full
|
||||
|
||||
/* FIXME: Like the gcc version, this needs to be extended for V8 */
|
||||
/* and V9. */
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* These are common definitions for architectures on which test_and_set
|
||||
* operates on pointer-sized quantities, the "clear" value contains
|
||||
* all zeroes, and the "set" value contains all ones.
|
||||
* This can be used if test_and_set is synthesized from compare_and_swap.
|
||||
*/
|
||||
typedef enum {AO_TS_clear = 0, AO_TS_set = 1} AO_TS_val;
|
||||
#define AO_TS_VAL_t AO_TS_val
|
||||
#define AO_TS_CLEAR AO_TS_clear
|
||||
#define AO_TS_SET AO_TS_set
|
||||
|
||||
#define AO_TS_t AO_t
|
||||
|
||||
#define AO_AO_TS_T 1
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* These are common definitions for architectures on which test_and_set
|
||||
* operates on byte sized quantities, the "clear" value contains
|
||||
* all zeroes, and the "set" value contains all ones.
|
||||
*/
|
||||
|
||||
#define AO_TS_t unsigned char
|
||||
typedef enum {AO_BYTE_TS_clear = 0, AO_BYTE_TS_set = 0xff} AO_BYTE_TS_val;
|
||||
#define AO_TS_VAL_t AO_BYTE_TS_val
|
||||
#define AO_TS_CLEAR AO_BYTE_TS_clear
|
||||
#define AO_TS_SET AO_BYTE_TS_set
|
||||
|
||||
#define AO_CHAR_TS_T 1
|
||||
|
||||
|
||||
|
||||
@@ -1,288 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
|
||||
* Original Author: Hans Boehm
|
||||
*
|
||||
* This file may be redistributed and/or modified under the
|
||||
* terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation; either version 2, or (at your option) any later version.
|
||||
*
|
||||
* It 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 in the
|
||||
* file doc/COPYING for more details.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#define AO_REQUIRE_CAS
|
||||
#include "atomic_ops_stack.h"
|
||||
#include <string.h> /* for ffs, which is assumed reentrant. */
|
||||
#include <stdlib.h>
|
||||
#ifdef AO_TRACE_MALLOC
|
||||
# include <stdio.h>
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We round up each allocation request to the next power of two
|
||||
* minus one word.
|
||||
* We keep one stack of free objects for each size. Each object
|
||||
* has an initial word (offset -sizeof(AO_t) from the visible pointer)
|
||||
* which contains either
|
||||
* The binary log of the object size in bytes (small objects)
|
||||
* The object size (a multiple of CHUNK_SIZE) for large objects.
|
||||
* The second case only arises if mmap-based allocation is supported.
|
||||
* We align the user-visible part of each object on a GRANULARITY
|
||||
* byte boundary. That means that the actual (hidden) start of
|
||||
* the object starts a word before this boundary.
|
||||
*/
|
||||
|
||||
#ifndef LOG_MAX_SIZE
|
||||
# define LOG_MAX_SIZE 16
|
||||
/* We assume that 2**LOG_MAX_SIZE is a multiple of page size. */
|
||||
#endif
|
||||
|
||||
#ifndef ALIGNMENT
|
||||
# define ALIGNMENT 16
|
||||
/* Assumed to be at least sizeof(AO_t). */
|
||||
#endif
|
||||
|
||||
#define CHUNK_SIZE (1 << LOG_MAX_SIZE)
|
||||
|
||||
#ifndef AO_INITIAL_HEAP_SIZE
|
||||
# define AO_INITIAL_HEAP_SIZE (2*(LOG_MAX_SIZE+1)*CHUNK_SIZE)
|
||||
#endif
|
||||
|
||||
char AO_initial_heap[AO_INITIAL_HEAP_SIZE];
|
||||
|
||||
static volatile AO_t initial_heap_ptr = (AO_t)AO_initial_heap;
|
||||
static volatile char *initial_heap_lim = AO_initial_heap + AO_INITIAL_HEAP_SIZE;
|
||||
|
||||
#if defined(HAVE_MMAP)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
static volatile AO_t mmap_enabled = 0;
|
||||
|
||||
void
|
||||
AO_malloc_enable_mmap(void)
|
||||
{
|
||||
AO_store(&mmap_enabled, 1);
|
||||
}
|
||||
|
||||
static char *get_mmaped(size_t sz)
|
||||
{
|
||||
char * result;
|
||||
|
||||
assert(!(sz & (CHUNK_SIZE - 1)));
|
||||
if (!mmap_enabled) return 0;
|
||||
# if defined(MAP_ANONYMOUS)
|
||||
result = mmap(0, sz, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
|
||||
# elif defined(MAP_ANON)
|
||||
result = mmap(0, sz, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
# else
|
||||
{
|
||||
int zero_fd = open("/dev/zero", O_RDONLY);
|
||||
result = mmap(0, sz, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE, zero_fd, 0);
|
||||
close(zero_fd);
|
||||
}
|
||||
# endif
|
||||
if (result == MAP_FAILED) result = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Allocate an object of size (incl. header) of size > CHUNK_SIZE. */
|
||||
/* sz includes space for an AO_t-sized header. */
|
||||
static char *
|
||||
AO_malloc_large(size_t sz)
|
||||
{
|
||||
char * result;
|
||||
/* The header will force us to waste ALIGNMENT bytes, incl. header. */
|
||||
sz += ALIGNMENT;
|
||||
/* Round to multiple of CHUNK_SIZE. */
|
||||
sz = (sz + CHUNK_SIZE - 1) & ~(CHUNK_SIZE - 1);
|
||||
result = get_mmaped(sz);
|
||||
if (result == 0) return 0;
|
||||
result += ALIGNMENT;
|
||||
((AO_t *)result)[-1] = (AO_t)sz;
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
AO_free_large(char * p)
|
||||
{
|
||||
AO_t sz = ((AO_t *)p)[-1];
|
||||
if (munmap(p - ALIGNMENT, (size_t)sz) != 0)
|
||||
abort(); /* Programmer error. Not really async-signal-safe, but ... */
|
||||
}
|
||||
|
||||
|
||||
#else /* No MMAP */
|
||||
|
||||
void
|
||||
AO_malloc_enable_mmap(void)
|
||||
{
|
||||
}
|
||||
|
||||
static char *get_mmaped(size_t sz)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *
|
||||
AO_malloc_large(size_t sz)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
AO_free_large(char * p)
|
||||
{
|
||||
abort(); /* Programmer error. Not really async-signal-safe, but ... */
|
||||
}
|
||||
|
||||
#endif /* No MMAP */
|
||||
|
||||
static char *
|
||||
get_chunk(void)
|
||||
{
|
||||
char *initial_ptr;
|
||||
char *my_chunk_ptr;
|
||||
char * my_lim;
|
||||
|
||||
retry:
|
||||
initial_ptr = (char *)AO_load(&initial_heap_ptr);
|
||||
my_chunk_ptr = (char *)(((AO_t)initial_ptr + (ALIGNMENT - 1))
|
||||
& ~(ALIGNMENT - 1));
|
||||
if (initial_ptr != my_chunk_ptr)
|
||||
{
|
||||
/* Align correctly. If this fails, someone else did it for us. */
|
||||
AO_compare_and_swap_acquire(&initial_heap_ptr, (AO_t)initial_ptr,
|
||||
(AO_t)my_chunk_ptr);
|
||||
}
|
||||
my_lim = my_chunk_ptr + CHUNK_SIZE;
|
||||
if (my_lim <= initial_heap_lim)
|
||||
{
|
||||
if (!AO_compare_and_swap(&initial_heap_ptr, (AO_t)my_chunk_ptr,
|
||||
(AO_t)my_lim))
|
||||
goto retry;
|
||||
return my_chunk_ptr;
|
||||
}
|
||||
/* We failed. The initial heap is used up. */
|
||||
my_chunk_ptr = get_mmaped(CHUNK_SIZE);
|
||||
assert (!((AO_t)my_chunk_ptr & (ALIGNMENT-1)));
|
||||
return my_chunk_ptr;
|
||||
}
|
||||
|
||||
/* Object free lists. Ith entry corresponds to objects */
|
||||
/* of total size 2**i bytes. */
|
||||
AO_stack_t AO_free_list[LOG_MAX_SIZE+1];
|
||||
|
||||
/* Chunk free list, linked through first word in chunks. */
|
||||
/* All entries of size CHUNK_SIZE. */
|
||||
AO_stack_t AO_chunk_free_list;
|
||||
|
||||
/* Break up the chunk, and add it to the object free list for */
|
||||
/* the given size. Sz must be a power of two. */
|
||||
/* We have exclusive access to chunk. */
|
||||
static void
|
||||
add_chunk_as(void * chunk, size_t sz, unsigned log_sz)
|
||||
{
|
||||
char *first = (char *)chunk + ALIGNMENT - sizeof(AO_t);
|
||||
char *limit = (char *)chunk + CHUNK_SIZE - sz;
|
||||
char *next, *p;
|
||||
|
||||
for (p = first; p <= limit; p = next) {
|
||||
next = p + sz;
|
||||
AO_stack_push(AO_free_list+log_sz, (AO_t *)p);
|
||||
}
|
||||
}
|
||||
|
||||
static int msbs[16] = {0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4};
|
||||
|
||||
/* Return the position of the most significant set bit in the */
|
||||
/* argument. */
|
||||
/* We follow the conventions of ffs(), i.e. the least */
|
||||
/* significant bit is number one. */
|
||||
int msb(size_t s)
|
||||
{
|
||||
int result = 0;
|
||||
if ((s & 0xff) != s) {
|
||||
/* The following shift often generates warnings on 32-bit arch's */
|
||||
/* That's OK, because it will never be executed there. */
|
||||
if (sizeof(size_t) > 4 && (s >> 32) != 0)
|
||||
{
|
||||
s >>= 32;
|
||||
result += 32;
|
||||
}
|
||||
if ((s >> 16) != 0)
|
||||
{
|
||||
s >>= 16;
|
||||
result += 16;
|
||||
}
|
||||
if ((s >> 8) != 0)
|
||||
{
|
||||
s >>= 8;
|
||||
result += 8;
|
||||
}
|
||||
}
|
||||
if (s > 15)
|
||||
{
|
||||
s >>= 4;
|
||||
result += 4;
|
||||
}
|
||||
result += msbs[s];
|
||||
return result;
|
||||
}
|
||||
|
||||
void *
|
||||
AO_malloc(size_t sz)
|
||||
{
|
||||
AO_t *result;
|
||||
size_t adj_sz = sz + sizeof(AO_t);
|
||||
int log_sz;
|
||||
if (sz > CHUNK_SIZE)
|
||||
return AO_malloc_large(sz);
|
||||
log_sz = msb(adj_sz-1);
|
||||
result = AO_stack_pop(AO_free_list+log_sz);
|
||||
while (0 == result) {
|
||||
void * chunk = get_chunk();
|
||||
if (0 == chunk) return 0;
|
||||
adj_sz = 1 << log_sz;
|
||||
add_chunk_as(chunk, adj_sz, log_sz);
|
||||
result = AO_stack_pop(AO_free_list+log_sz);
|
||||
}
|
||||
*result = log_sz;
|
||||
# ifdef AO_TRACE_MALLOC
|
||||
fprintf(stderr, "%x: AO_malloc(%lu) = %p\n",
|
||||
(int)pthread_self(), (unsigned long)sz, result+1);
|
||||
# endif
|
||||
return result + 1;
|
||||
}
|
||||
|
||||
void
|
||||
AO_free(void *p)
|
||||
{
|
||||
char *base = (char *)p - sizeof(AO_t);
|
||||
int log_sz;
|
||||
|
||||
if (0 == p) return;
|
||||
log_sz = *(AO_t *)base;
|
||||
# ifdef AO_TRACE_MALLOC
|
||||
fprintf(stderr, "%x: AO_free(%p sz:%lu)\n", (int)pthread_self(), p,
|
||||
(unsigned long)
|
||||
(log_sz > LOG_MAX_SIZE? log_sz : (1 << log_sz)));
|
||||
# endif
|
||||
if (log_sz > LOG_MAX_SIZE)
|
||||
AO_free_large(p);
|
||||
else
|
||||
AO_stack_push(AO_free_list+log_sz, (AO_t *)base);
|
||||
}
|
||||
Loaded 100 of 14820 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user